/* Per-assistant settings (staging) */
body.assistant-settings-enabled #poe-composer-prompt,
body.assistant-settings-enabled [data-thread-action="prompt"],
body.assistant-settings-enabled [data-chat-action="prompt"] {
  display: none !important;
}

.assistant-title-settings-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.assistant-title-settings-trigger::after {
  display: none;
}

.assistant-settings-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.assistant-settings-title-row .assistant-title-settings-trigger {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-settings-title-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.07);
  color: #c72f69;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.assistant-settings-title-button:hover {
  border-color: rgba(236, 72, 153, 0.38);
  background: rgba(236, 72, 153, 0.13);
}

.assistant-settings-title-button:focus-visible {
  outline: 2px solid rgba(236, 72, 153, 0.42);
  outline-offset: 2px;
}

.assistant-title-settings-trigger:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.assistant-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
}

.assistant-settings-modal[hidden] {
  display: none;
}

.assistant-settings-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.assistant-settings-modal__card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(700px, calc(100vw - 28px));
  max-height: min(820px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #f6f7fb;
  color: #1f2937;
  box-shadow: 0 36px 110px rgba(15, 23, 42, 0.38);
  transform: translate(-50%, -50%);
}

.assistant-settings-modal__card > header,
.assistant-settings-modal__card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 14px 18px;
}

.assistant-settings-modal__card > header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,245,249,.96));
}

.assistant-settings-modal__card > header span {
  color: #e43d76;
  font: 700 9px/1.2 ui-monospace, monospace;
  letter-spacing: 0.14em;
}

.assistant-settings-modal__card h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.assistant-settings-modal__card > header button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
}

.assistant-settings-modal__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 20px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.assistant-settings-modal__card > footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #f6f7fb;
  padding: 14px 18px 18px;
  padding-bottom: max(18px, calc(12px + env(safe-area-inset-bottom, 0px)));
}

.assistant-settings-modal__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 4px;
}

.assistant-settings-modal__avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: linear-gradient(145deg, #ec4899, #fb6b32);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.24);
}

.assistant-settings-modal__profile > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.assistant-settings-modal__profile strong {
  font-size: 14px;
}

.assistant-settings-modal__profile small,
.assistant-settings-modal__field small {
  color: #8a94a6;
  font-size: 10px;
  font-weight: 450;
}

.assistant-settings-modal__body > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid #e5e9f0;
  border-radius: 14px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.assistant-settings-modal__body input[type="text"],
.assistant-settings-modal__body input[type="number"],
.assistant-settings-modal__body textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dbe2ea;
  border-radius: 11px;
  background: #fff;
  color: #111827;
  font: 13px/1.5 inherit;
  box-sizing: border-box;
}

.assistant-settings-modal__body textarea {
  min-height: 108px;
  resize: vertical;
}

.assistant-settings-modal__advanced,
.assistant-settings-modal__background {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
}

.assistant-settings-modal__section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  grid-column: 1 / -1;
  gap: 12px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.assistant-settings-modal__section-title small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 450;
}

.assistant-settings-modal__range {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #64748b;
  font-size: 11px;
}

.assistant-settings-modal__range:first-of-type {
  grid-column: 1 / -1;
}

.assistant-settings-modal__range > span,
.assistant-settings-modal__switch,
.assistant-settings-modal__number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assistant-settings-modal__number {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.assistant-settings-modal__label-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.assistant-settings-info {
  position: relative;
  display: inline-grid;
  width: 17px;
  height: 17px;
  padding: 0;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #aab3c0;
  border-radius: 50%;
  background: transparent;
  color: #7c8798;
  font: 700 10px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: help;
}

.assistant-settings-info::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 30;
  width: 240px;
  padding: 9px 11px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.96);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.assistant-settings-info:hover::after,
.assistant-settings-info:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.assistant-settings-info:focus-visible {
  outline: 2px solid rgba(236, 72, 153, 0.4);
  outline-offset: 2px;
}

.assistant-settings-info::after {
  display: none !important;
}

.assistant-settings-floating-tip {
  position: fixed;
  z-index: 2200;
  width: min(280px, calc(100vw - 20px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.97);
  color: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.3);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.assistant-settings-floating-tip[hidden] {
  display: none;
}

.assistant-settings-floating-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.assistant-settings-modal__range output {
  min-width: 54px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.09);
  color: #d72d69;
  font-weight: 700;
  text-align: center;
}

.assistant-settings-modal__range input {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899, #fb6b32);
  cursor: pointer;
}

.assistant-settings-modal__range input::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.25);
}

.assistant-settings-modal__number {
  color: #64748b;
  font-size: 11px;
}

.assistant-settings-modal__number input {
  width: 130px !important;
}

.assistant-settings-modal__number small {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.assistant-settings-modal__switch {
  min-height: 42px;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  padding: 0 4px;
}

.assistant-settings-modal__switch input {
  width: 20px;
  height: 20px;
  accent-color: #ec4899;
}

.assistant-settings-modal__background > div {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}

.assistant-settings-modal__upload,
.assistant-settings-modal__background button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.assistant-settings-modal__background button:disabled {
  cursor: default;
  opacity: 0.45;
}

.assistant-settings-modal__background small {
  grid-column: 1 / -1;
  color: #94a3b8;
  font-size: 10px;
}

.assistant-settings-modal__card > footer {
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  padding: 14px 18px 20px;
  padding-bottom: max(20px, calc(14px + env(safe-area-inset-bottom, 0px)));
}

.assistant-settings-modal__card > footer button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.assistant-settings-modal__card > footer button[type="submit"] {
  border-color: transparent;
  background: linear-gradient(135deg, #ec4899, #fb6b32);
  color: #fff;
  box-shadow: 0 7px 18px rgba(236, 72, 153, 0.2);
}

/* Chatbox-style chat background: full-bleed photo + glass UI, not a muddy overlay.
   Selectors intentionally beat later theme-night / staging-visual-rich !important rules. */
html body.poe-app .poe-main[data-view="chat"].has-assistant-background,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background {
  background-image: var(--assistant-chat-bg) !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  isolation: isolate;
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background::before,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background::before,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(8, 12, 20, 0.28);
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background > * {
  position: relative;
  z-index: 1;
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-panel,
html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-stage,
html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-body,
html body.poe-app .poe-main[data-view="chat"].has-assistant-background .chat-window,
html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-composer,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-panel,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-body,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .chat-window,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-panel,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-body,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .chat-window {
  background: transparent !important;
  box-shadow: none !important;
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head {
  background: rgba(15, 20, 29, 0.28) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-composer__box,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-composer__box,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-composer__box,
html.theme-night .poe-app.staging-composer-poe .poe-main[data-view="chat"].has-assistant-background .poe-composer__box {
  background: rgba(22, 28, 40, 0.52) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.ai .bubble.ai-rich,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.ai .bubble.ai-rich,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.ai .bubble.ai-rich,
html.theme-night .poe-app.staging-composer-poe .poe-main[data-view="chat"].has-assistant-background .message.ai .bubble.ai-rich {
  background: rgba(30, 38, 52, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f1f5f9 !important;
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.user .bubble,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.user .bubble,
html.theme-night.staging-visual-rich body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.user .bubble {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.78), rgba(249, 115, 22, 0.72)) !important;
  border: 1px solid rgba(251, 182, 206, 0.28) !important;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.2) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-nav-rail,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-nav-rail {
  background: rgba(22, 28, 40, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .message-assistant-head__name,
html body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head__bot,
html body.poe-app .poe-main[data-view="chat"].has-assistant-background #chat-mode-title,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .message-assistant-head__name,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head__bot,
html.theme-night body.poe-app .poe-main[data-view="chat"].has-assistant-background #chat-mode-title {
  color: #f8fafc !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

html body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.ai .bubble.ai-rich a {
  color: #93c5fd !important;
}

html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background::before {
  background: rgba(255, 255, 255, 0.18);
}

html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head {
  background: rgba(255, 255, 255, 0.42) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-composer__box {
  background: rgba(255, 255, 255, 0.58) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background .message.ai .bubble.ai-rich {
  background: rgba(255, 255, 255, 0.62) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background .message-assistant-head__name,
html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background .poe-chat-head__bot,
html:not(.theme-night) body.poe-app .poe-main[data-view="chat"].has-assistant-background #chat-mode-title {
  color: #0f172a !important;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.45);
}

html.theme-night .assistant-settings-modal__card,
html.theme-night .assistant-settings-modal__body input,
html.theme-night .assistant-settings-modal__body textarea,
html.theme-night .assistant-settings-modal__upload,
html.theme-night .assistant-settings-modal__background button,
html.theme-night .assistant-settings-modal__card > footer button {
  border-color: rgba(255, 255, 255, 0.1);
  background: #161d29;
  color: #e8edf5;
}

html.theme-night .assistant-settings-modal__advanced,
html.theme-night .assistant-settings-modal__background,
html.theme-night .assistant-settings-modal__body > label {
  border-color: rgba(255, 255, 255, 0.09);
  background: #111720;
}

html.theme-night .assistant-settings-modal__card > header,
html.theme-night .assistant-settings-modal__card > footer {
  border-color: rgba(255, 255, 255, 0.09);
  background: #161d29;
}

html.theme-night .assistant-settings-title-button {
  border-color: rgba(244, 114, 182, 0.25);
  background: rgba(244, 114, 182, 0.1);
  color: #f9a8d4;
}

html.theme-night .assistant-settings-info {
  border-color: #64748b;
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .assistant-settings-title-button span {
    display: none;
  }

  .assistant-settings-title-button {
    width: 30px;
    padding: 0;
    justify-content: center;
  }

  .assistant-settings-modal__card {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .assistant-settings-modal__body {
    padding: 14px;
  }

  .assistant-settings-modal__advanced,
  .assistant-settings-modal__background {
    grid-template-columns: 1fr;
  }

  .assistant-settings-modal__advanced > *,
  .assistant-settings-modal__background > * {
    grid-column: 1;
  }

  .assistant-settings-info::after {
    width: min(220px, calc(100vw - 56px));
  }
}

/* Chatbox-inspired staging interactions */
.chatbox-token-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-height: 25px;
  margin: 2px 0 0;
  padding: 5px 2px 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  box-sizing: border-box;
}

.chatbox-token-meter strong {
  color: #64748b;
  font-weight: 700;
}

.chatbox-token-meter__auto {
  margin-left: auto;
  color: #16a34a;
}

.chatbox-token-meter.is-web-search .chatbox-token-meter__auto {
  color: #d97706;
  font-weight: 700;
}

.chatbox-link-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
}

.chatbox-link-modal[hidden] {
  display: none;
}

.chatbox-link-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

.chatbox-link-modal__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  transform: translate(-50%, -50%);
}

.chatbox-link-modal__card header,
.chatbox-link-modal__card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}

.chatbox-link-modal__card header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.chatbox-link-modal__card header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
}

.chatbox-link-modal__card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 16px 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.chatbox-link-modal__card input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe2ea;
  border-radius: 11px;
  background: #fff;
  color: #111827;
  font-size: 14px;
}

.chatbox-link-modal__card input:focus {
  border-color: rgba(236, 72, 153, 0.55);
  outline: 3px solid rgba(236, 72, 153, 0.1);
}

.chatbox-link-modal__card > p {
  margin: 0;
  padding: 0 16px 8px;
  color: #94a3b8;
  font-size: 11px;
}

.chatbox-link-modal__card footer {
  justify-content: flex-end;
}

.chatbox-link-modal__card footer button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-weight: 700;
  cursor: pointer;
}

.chatbox-link-modal__card footer button[type="submit"] {
  border-color: transparent;
  background: linear-gradient(135deg, #ec4899, #fb6b32);
  color: #fff;
}

html.theme-night .chatbox-token-meter strong {
  color: #cbd5e1;
}

html.theme-night .chatbox-link-modal__card,
html.theme-night .chatbox-link-modal__card input,
html.theme-night .chatbox-link-modal__card footer button {
  border-color: rgba(255, 255, 255, 0.1);
  background: #161d29;
  color: #e8edf5;
}

@media (max-width: 640px) {
  .chatbox-token-meter {
    gap: 7px;
    padding: 0 4px;
    font-size: 9px;
  }

  .chatbox-token-meter__auto {
    display: none;
  }
}

/* Staging chat tools: web search, vault context, remote MCP */
.chat-tools-button {
  position: relative;
}

.chat-tools-button.is-active {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #168449 !important;
}

.chat-tools-button [data-chat-tool-count] {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.chat-tools-button [data-chat-tool-count][hidden] {
  display: none;
}

.chat-tools-panel {
  position: fixed;
  left: 14px;
  bottom: calc(100% + 10px);
  z-index: 1400;
  width: min(370px, calc(100vw - 28px));
  max-height: min(620px, 72vh);
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
}

.chat-tools-panel[hidden] {
  display: none;
}

.chat-tools-panel > header,
.chat-tools-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.chat-tools-panel > header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: inherit;
}

.chat-tools-panel > header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
}

.chat-tools-panel > section {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.chat-tools-panel h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.chat-tools-panel h3 small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.chat-tools-panel__scroll {
  display: flex;
  max-height: 190px;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

.chat-tools-panel__check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
}

.chat-tools-panel__check:hover {
  background: rgba(15, 23, 42, 0.04);
}

.chat-tools-panel__check:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.08);
}

.chat-tools-panel__check input {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
}

.chat-tools-panel__check span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.chat-tools-panel__check strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-tools-panel__check small,
.chat-tools-panel__empty,
.chat-tools-panel > footer span {
  color: #8490a2;
  font-size: 10px;
}

.chat-tools-panel__custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
}

.chat-tools-panel__custom-row > button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #a3acba;
  font-size: 18px;
  cursor: pointer;
}

.chat-tools-panel__custom-row > button:hover {
  background: rgba(225, 29, 72, 0.08);
  color: #be123c;
}

.chat-tools-panel__mcp-form {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 6px;
  margin-top: 10px;
}

.chat-tools-panel__mcp-form input {
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font-size: 11px;
}

.chat-tools-panel__mcp-form button {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: #334155;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.chat-tools-panel__mcp-form p {
  grid-column: 1 / -1;
  margin: 0;
  color: #be123c;
  font-size: 10px;
}

.chat-tools-panel__empty,
.chat-tools-panel__error {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
}

.chat-tools-panel__error {
  margin: 14px;
  color: #b42345;
  font-size: 12px;
}

.chat-tools-panel > footer button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

html.theme-night .chat-tools-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(18, 24, 34, 0.98);
  color: #e8edf5;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
}

html.theme-night .chat-tools-button [data-chat-tool-count] {
  border-color: #151b25;
}

html.theme-night .chat-tools-panel__check:hover {
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .chat-tools-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-height: 78dvh;
  }

  .chat-tools-panel__mcp-form {
    grid-template-columns: 1fr;
  }
}

/* Cherry-style assistant → topics workspace (staging only) */
body.cherry-chat-staging {
  --cherry-accent: #f05286;
  --cherry-accent-soft: rgba(240, 82, 134, 0.12);
  --cherry-surface: #f8f9fc;
  --cherry-line: rgba(30, 41, 59, 0.11);
}

body.cherry-chat-staging .poe-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 252, 0.98)),
    #f8f9fc;
}

.cherry-assistant {
  position: relative;
  margin: 2px 9px 8px;
  padding: 26px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: 20;
}

.cherry-assistant::before {
  display: none;
}

.cherry-assistant__eyebrow,
.cherry-assistant__topic-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cherry-assistant__manage {
  min-height: 32px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #be3566;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.cherry-assistant__manage--flat {
  position: absolute;
  top: 0;
  right: 2px;
  min-height: 24px;
  padding: 0 4px;
  color: #8b95a6;
  font-size: 10px;
}

.cherry-assistant__manage--brand {
  flex: 0 0 auto;
  min-height: 32px;
  margin-left: auto;
  padding: 0 8px;
  border: 1px solid var(--cherry-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.58);
  color: #7c879a;
  font-size: 11px;
}

.cherry-assistant__manage--brand:hover {
  border-color: rgba(240, 82, 134, 0.24);
  background: var(--cherry-accent-soft);
  color: #be3566;
}

.cherry-assistant__current {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  margin: 4px 0 8px;
  padding: 6px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #172033;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.cherry-assistant__current:hover,
.cherry-assistant__current:focus-visible {
  background: var(--cherry-accent-soft);
}

.cherry-assistant__current:focus-visible,
.cherry-assistant__manage:focus-visible,
.cherry-assistant__option:focus-visible {
  outline: 2px solid rgba(240, 82, 134, 0.5);
  outline-offset: 2px;
}

.cherry-assistant__avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #f05286, #fb7a3f);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 5px 13px rgba(240, 82, 134, 0.22);
}

.cherry-assistant__copy,
.cherry-assistant__option > span:last-child {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.cherry-assistant__copy strong,
.cherry-assistant__option strong {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cherry-assistant__copy small,
.cherry-assistant__option small {
  overflow: hidden;
  color: #7c879a;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cherry-assistant__menu {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  right: 0;
  z-index: 50;
  padding: 6px;
  border: 1px solid var(--cherry-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.cherry-assistant__menu[hidden] {
  display: none;
}

.cherry-assistant__option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #283246;
  text-align: left;
  cursor: pointer;
}

.cherry-assistant__option:hover,
.cherry-assistant__option.is-active {
  background: var(--cherry-accent-soft);
}

.cherry-assistant__option .cherry-assistant__avatar {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 12px;
}

.cherry-assistant__topic-label {
  padding: 8px 2px 0;
  border-top: 1px solid var(--cherry-line);
}

.cherry-assistant__rail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 4px -2px 7px;
  padding: 2px;
  max-height: min(430px, 48vh);
  overflow-y: auto;
  scrollbar-width: thin;
}

.cherry-assistant__chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--cherry-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  color: #64748b;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.cherry-assistant__chip:hover {
  border-color: rgba(240, 82, 134, 0.22);
  background: #fff;
  color: #334155;
}

.cherry-assistant__chip.is-active {
  border-color: rgba(240, 82, 134, 0.18);
  background: var(--cherry-accent-soft);
  color: #be3566;
}

.cherry-assistant__chip:focus-visible {
  outline: 2px solid rgba(240, 82, 134, 0.5);
  outline-offset: 2px;
}

.cherry-assistant__chip .cherry-assistant__avatar {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 12px;
  box-shadow: none;
}

.cherry-assistant__chip-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.cherry-assistant__chip strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cherry-assistant__chip small {
  overflow: hidden;
  color: #8a94a6;
  font-size: 10px;
  font-weight: 450;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cherry-assistant__chip-arrow {
  flex: 0 0 auto;
  color: #a3acba;
}

.cherry-assistant__chip.is-active .cherry-assistant__chip-arrow {
  color: #d43f73;
}

.cherry-sidebar-assistants {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 4px;
  padding: 0;
}

.cherry-sidebar-assistants .cherry-assistant__chip {
  flex: 0 0 auto;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.cherry-sidebar-assistants .cherry-assistant__chip:hover {
  border-color: transparent;
  background: rgba(15, 23, 42, 0.045);
}

.cherry-sidebar-assistants .cherry-assistant__chip.is-active {
  border-color: rgba(240, 82, 134, 0.18);
  background: var(--cherry-accent-soft);
}

.cherry-custom-assistants {
  margin: 0 10px 8px;
}

.cherry-custom-assistants[hidden] {
  display: none;
}

.cherry-custom-assistants__label {
  padding: 1px 4px 5px;
  color: #7c879a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.cherry-custom-assistants__rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(250px, 30vh);
  overflow-y: auto;
  scrollbar-width: thin;
}

.cherry-custom-assistants .cherry-assistant__chip {
  border-color: var(--cherry-line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.035);
}

.cherry-custom-assistants .cherry-assistant__chip:hover {
  border-color: rgba(240, 82, 134, 0.22);
  background: #fff;
}

.cherry-custom-assistants .cherry-assistant__chip.is-active {
  border-color: rgba(240, 82, 134, 0.28);
  background: var(--cherry-accent-soft);
}

.cherry-assistant__topic-label small {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #edf0f5;
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0;
}

body.cherry-chat-staging .poe-new-chat span {
  font-weight: 650;
}

.cherry-assistant-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.cherry-assistant-modal[hidden] {
  display: none;
}

.cherry-assistant-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 18, 29, 0.56);
  backdrop-filter: blur(5px);
}

.cherry-assistant-modal__sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(820px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 28px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #f8f9fc;
  color: #172033;
  box-shadow: 0 28px 80px rgba(4, 8, 18, 0.34);
  transform: translate(-50%, -50%);
}

.cherry-assistant-modal__sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cherry-line);
  background: rgba(255, 255, 255, 0.76);
}

.cherry-assistant-modal__sheet h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.cherry-assistant-modal__kicker {
  color: #c83d6d;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.13em;
}

.cherry-assistant-modal__sheet > header > button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
}

.cherry-assistant-modal__layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  max-height: calc(min(720px, 100dvh - 28px) - 77px);
}

.cherry-assistant-modal__layout > nav {
  overflow: auto;
  padding: 12px;
  border-right: 1px solid var(--cherry-line);
  background: #f1f3f8;
}

.cherry-assistant-modal__layout > nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4b5568;
  text-align: left;
  cursor: pointer;
}

.cherry-assistant-modal__layout > nav button.is-active {
  background: #fff;
  color: #be3566;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.cherry-assistant-modal__layout > nav button span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--cherry-accent-soft);
  font-size: 12px;
}

.cherry-assistant-modal__new {
  margin-top: 8px;
  border: 1px dashed rgba(190, 53, 102, 0.35) !important;
  color: #be3566 !important;
}

.cherry-assistant-modal form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  overflow: auto;
  padding: 20px;
}

.cherry-assistant-modal form > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  color: #4b5568;
  font-size: 12px;
  font-weight: 650;
}

.cherry-assistant-modal input,
.cherry-assistant-modal select,
.cherry-assistant-modal textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dbe0e9;
  border-radius: 11px;
  background: #fff;
  color: #172033;
  font: 14px/1.5 inherit;
}

.cherry-assistant-modal textarea {
  min-height: 150px;
  resize: vertical;
}

.cherry-assistant-modal input:focus,
.cherry-assistant-modal select:focus,
.cherry-assistant-modal textarea:focus {
  border-color: rgba(240, 82, 134, 0.58);
  outline: 3px solid rgba(240, 82, 134, 0.12);
}

.cherry-assistant-modal__prompt,
.cherry-assistant-modal__switch,
.cherry-assistant-modal form > footer {
  grid-column: 1 / -1;
}

.cherry-assistant-modal__prompt small,
.cherry-assistant-modal__switch small {
  color: #8791a2;
  font-size: 11px;
  font-weight: 450;
}

.cherry-assistant-modal__switch {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid #e2e6ed;
  border-radius: 12px;
  background: #fff;
}

.cherry-assistant-modal__switch > span {
  display: flex;
  flex-direction: column;
}

.cherry-assistant-modal__switch input {
  width: 20px;
  min-height: 20px;
}

.cherry-assistant-modal form > footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 9px;
  padding-top: 4px;
}

.cherry-assistant-modal form > footer button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #dbe0e9;
  border-radius: 11px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.cherry-assistant-modal form > footer .is-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #e9487d, #fb743d);
  color: #fff;
}

.cherry-assistant-modal form > footer .is-danger {
  border-color: transparent;
  background: transparent;
  color: #c2415d;
}

html.theme-night body.cherry-chat-staging {
  --cherry-surface: #10151f;
  --cherry-line: rgba(255, 255, 255, 0.1);
}

html.theme-night body.cherry-chat-staging .poe-sidebar {
  background: #111720;
}

html.theme-night .cherry-assistant {
  background: transparent;
}

html.theme-night .cherry-assistant__current,
html.theme-night .cherry-assistant__option,
html.theme-night .cherry-assistant__chip {
  background: rgba(255, 255, 255, 0.035);
  color: #e7ebf3;
}

html.theme-night .cherry-assistant__chip:hover {
  background: rgba(255, 255, 255, 0.07);
}

html.theme-night .cherry-assistant__chip.is-active {
  background: rgba(240, 82, 134, 0.16);
  color: #f9a8c4;
}

html.theme-night .cherry-assistant__manage--brand {
  background: rgba(255, 255, 255, 0.035);
}

html.theme-night .cherry-sidebar-assistants .cherry-assistant__chip {
  background: transparent;
}

html.theme-night .cherry-sidebar-assistants .cherry-assistant__chip:hover {
  background: rgba(255, 255, 255, 0.07);
}

html.theme-night .cherry-custom-assistants .cherry-assistant__chip {
  background: rgba(255, 255, 255, 0.035);
}

html.theme-night .cherry-custom-assistants .cherry-assistant__chip:hover {
  background: rgba(255, 255, 255, 0.07);
}

html.theme-night .cherry-assistant__menu,
html.theme-night .cherry-assistant-modal__sheet,
html.theme-night .cherry-assistant-modal input,
html.theme-night .cherry-assistant-modal select,
html.theme-night .cherry-assistant-modal textarea,
html.theme-night .cherry-assistant-modal__switch,
html.theme-night .cherry-assistant-modal form > footer button {
  background: #161d29;
  color: #e7ebf3;
}

html.theme-night .cherry-assistant-modal__sheet > header,
html.theme-night .cherry-assistant-modal__layout > nav {
  background: #111720;
}

html.theme-night .cherry-assistant-modal__layout > nav button.is-active {
  background: rgba(240, 82, 134, 0.14);
}

@media (max-width: 720px) {
  .cherry-assistant-modal__sheet {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .cherry-assistant-modal__layout {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 94px);
    overflow: auto;
  }

  .cherry-assistant-modal__layout > nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--cherry-line);
  }

  .cherry-assistant-modal__layout > nav button {
    flex: 0 0 auto;
    width: auto;
  }

  .cherry-assistant-modal form {
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 16px;
  }

  .cherry-assistant-modal form > label,
  .cherry-assistant-modal__prompt,
  .cherry-assistant-modal__switch,
  .cherry-assistant-modal form > footer {
    grid-column: 1;
  }

  .cherry-assistant-modal form > footer {
    grid-template-columns: 1fr 1fr;
  }

  .cherry-assistant-modal form > footer span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cherry-assistant__current {
    transition: none;
  }
}
* {
  box-sizing: border-box;
}

:root {
  --bg: #f8f5ef;
  --paper: rgba(255, 255, 255, 0.86);
  --paper-strong: #fffaf3;
  --ink: #172033;
  --muted: #6b7280;
  --line: rgba(23, 32, 51, 0.1);
  --brand: #ec4899;
  --brand-2: #f97316;
  --green: #16a34a;
  --teal: #0f766e;
  --shadow: 0 24px 60px rgba(84, 54, 25, 0.12);
  --radius: 28px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(236, 72, 153, 0.14), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(249, 115, 22, 0.14), transparent 32%),
    linear-gradient(180deg, #fffaf4 0%, var(--bg) 46%, #ffffff 100%);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.preview-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.preview-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 244, 0.78);
  border-bottom: 1px solid var(--line);
}

.preview-nav__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  flex-wrap: nowrap;
}

.preview-nav-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  margin-left: auto;
}

.preview-nav-auth[data-auth-state="loading"] {
  min-width: 120px;
  min-height: 36px;
}

.preview-nav-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.preview-nav-auth__btn:hover {
  transform: translateY(-1px);
}

.preview-nav-auth__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.22);
}

.preview-nav-auth__btn--outline {
  color: #be185d;
  border: 1px solid rgba(236, 72, 153, 0.34);
  background: rgba(255, 255, 255, 0.82);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 128px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.28);
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #4b5563;
  font-size: 12px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 6px 6px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  font-weight: inherit;
  flex: 0 0 auto;
}

.nav-links a:hover,
.nav-links .is-active {
  background: rgba(236, 72, 153, 0.1);
  color: var(--brand);
}

.utility-menu {
  position: relative;
  flex: 0 0 auto;
  justify-self: end;
}

.utility-menu summary {
  list-style: none;
  min-width: 84px;
  padding: 9px 16px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.95), rgba(103, 232, 249, 0.86));
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.2);
}

.utility-menu summary::-webkit-details-marker {
  display: none;
}

.utility-menu[open] summary {
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
}

.utility-menu__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(280px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.94)),
    radial-gradient(circle at 92% 8%, rgba(45, 212, 191, 0.18), transparent 36%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.utility-menu__panel a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 184, 166, 0.12);
  border-radius: 14px;
  color: #164e63;
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.utility-menu__panel a:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.32);
  background: rgba(236, 254, 255, 0.95);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
}

.tool-hero {
  padding: 44px 0 26px;
}

.tool-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.68fr);
  gap: 28px;
  align-items: end;
}

.tool-hero-grid--single {
  grid-template-columns: minmax(0, 760px);
}

body[data-preview-tool="second-contract"] .tool-hero-grid--single {
  grid-template-columns: minmax(0, 980px);
}

body[data-preview-tool="second-contract"] .tool-hero h1 {
  white-space: nowrap;
}

body[data-preview-tool="calculator"] .tool-hero-grid--single {
  grid-template-columns: minmax(0, 1040px);
}

body[data-preview-tool="calculator"] .tool-hero h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(36px, 4.45vw, 58px);
  letter-spacing: -0.06em;
}

.tool-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.tool-hero h1 span {
  color: var(--brand);
}

.tool-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.tool-workbench {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,250,245,0.72)),
    radial-gradient(circle at 100% 0%, rgba(236,72,153,0.12), transparent 34%);
  box-shadow: 0 28px 80px rgba(84,54,25,0.13);
}

.tool-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fx-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.fx-form-grid > .tool-field:first-child,
.fx-action-field {
  grid-column: 1 / -1;
}

.fx-workbench {
  width: min(100%, 560px);
  margin: 0 auto;
}

.fx-workbench .tool-result {
  margin-top: 20px;
}

.fx-workbench .tool-result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.fx-workbench .tool-stat {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 88px;
  padding: 16px 12px;
  text-align: center;
}

.fx-workbench .tool-stat strong {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.2;
  word-break: normal;
}

.fx-workbench .tool-stat span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.fx-stat-rate strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

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

.tool-field {
  display: grid;
  gap: 7px;
}

.tool-field label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 900;
}

.tool-input,
.tool-select,
.tool-textarea {
  width: 100%;
  border: 1px solid rgba(23,32,51,0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.tool-input,
.tool-select {
  min-height: 46px;
  padding: 0 14px;
}

.tool-textarea {
  min-height: 180px;
  padding: 14px;
  resize: vertical;
  line-height: 1.65;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
  border-color: rgba(236,72,153,0.38);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.1);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (min-width: 920px) {
  .fx-form-grid {
    grid-template-columns: minmax(180px, 1.25fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(108px, 0.55fr);
  }

  .fx-form-grid > .tool-field:first-child,
  .fx-action-field {
    grid-column: auto;
  }

  .fx-workbench {
    width: min(100%, 720px);
  }
}

.fx-action-field .btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
}

.tool-result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(23,32,51,0.08);
  border-radius: 24px;
  background: rgba(255,255,255,0.74);
}

.tool-result h3 {
  margin: 0 0 10px;
}

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

.media-extract-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin: 0 auto;
  box-sizing: border-box;
}

body[data-preview-tool="watermark"] .tool-hero > .preview-shell,
body[data-preview-tool="watermark"] .section--tight > .preview-shell {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
}

/* 嵌入态：去水印与画像素描同宽 1180 */
html.preview-embed-mode body[data-preview-tool="watermark"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="watermark"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="watermark"] .tool-workbench,
html.preview-embed-mode body[data-preview-tool="watermark"] .media-extract-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

/* 嵌入态：UID 检测内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="uid-check"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="uid-check"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="uid-check"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="uid-check"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="uid-check"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：Maps 抓官网内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="maps-hub"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="maps-hub"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="maps-hub"] .tool-workbench,
html.preview-embed-mode body[data-preview-tool="maps-hub"] .maps-hub-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="maps-hub"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="maps-hub"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：日本年号内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="wareki"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="wareki"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="wareki"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="wareki"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="wareki"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：假名转换内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="kana"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="kana"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="kana"] .tool-workbench,
html.preview-embed-mode body[data-preview-tool="kana"] .kana-shell {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="kana"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="kana"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：日本邮编内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="postal-code"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="postal-code"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="postal-code"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="postal-code"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="postal-code"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：日本节假日内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="japan-holidays"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="japan-holidays"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="japan-holidays"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="japan-holidays"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="japan-holidays"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：计算器内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="calculator"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="calculator"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="calculator"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="calculator"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="calculator"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：复利计算器内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="compound"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="compound"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="compound"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="compound"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="compound"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：汇率换算内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="fx"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="fx"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="fx"] .tool-workbench,
html.preview-embed-mode body[data-preview-tool="fx"] .fx-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="fx"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="fx"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：遗产税内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="inheritance"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="inheritance"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="inheritance"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="inheritance"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="inheritance"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：秒合约内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="second-contract"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="second-contract"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="second-contract"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="second-contract"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="second-contract"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：2FA 内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="twofa"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="twofa"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="twofa"] .tool-workbench,
html.preview-embed-mode body[data-preview-tool="twofa"] .twofa-card,
html.preview-embed-mode body[data-preview-tool="twofa"] .twofa-wrap {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="twofa"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="twofa"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：临时邮箱内容跟 iframe 同宽铺满 */
html.preview-embed-mode body[data-preview-tool="temp-mail"] .tool-hero > .preview-shell,
html.preview-embed-mode body[data-preview-tool="temp-mail"] .section--tight > .preview-shell,
html.preview-embed-mode body[data-preview-tool="temp-mail"] .tool-workbench {
  width: min(1180px, 100%);
  max-width: min(1180px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

html.preview-embed-mode body[data-preview-tool="temp-mail"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode body[data-preview-tool="temp-mail"]::before {
  display: none !important;
  content: none !important;
}

/* 嵌入态：去掉底部重阴影 / 渐变噪点，避免卡片下出现一道「痕迹」 */
html.preview-embed-mode body[data-preview-tool="watermark"] {
  background: transparent !important;
  min-height: 0;
}

html.preview-embed-mode.staging-visual-rich body[data-preview-tool="watermark"]::before,
html.preview-embed-mode body[data-preview-tool="watermark"]::before {
  display: none !important;
  content: none !important;
}

html.preview-embed-mode body[data-preview-tool="watermark"] main,
html.preview-embed-mode body[data-preview-tool="watermark"] .section,
html.preview-embed-mode body[data-preview-tool="watermark"] .section--tight {
  background: transparent;
  overflow: visible;
}

html.preview-embed-mode body[data-preview-tool="watermark"] .tool-hero {
  padding: 10px 0 6px;
}

html.preview-embed-mode body[data-preview-tool="watermark"] .section--tight {
  padding-top: 8px;
  padding-bottom: 28px;
}

html.preview-embed-mode body[data-preview-tool="watermark"] .tool-workbench.media-extract-workbench {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 28px rgba(84, 54, 25, 0.07);
}

html.preview-embed-mode body[data-preview-tool="watermark"] .tool-result.media-result {
  border-color: rgba(23, 32, 51, 0.06);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

body[data-preview-tool="watermark"] .tool-hero-grid--single {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

body[data-preview-tool="watermark"] .tool-page-grid,
body[data-preview-tool="watermark"] .media-extract-workbench {
  width: 100%;
}

body[data-preview-tool="watermark"] .media-extract-workbench .tool-field,
body[data-preview-tool="watermark"] .media-extract-workbench .tool-textarea,
body[data-preview-tool="watermark"] .media-extract-workbench .tool-result {
  width: 100%;
  box-sizing: border-box;
}

body[data-preview-tool="watermark"] .media-extract-workbench .media-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.media-extract-actions {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.media-download-path-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.media-download-path__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.media-download-path__prefix {
  color: var(--muted);
}

.media-download-path__value {
  color: var(--ink);
  font-weight: 700;
  word-break: break-all;
}

.media-download-path__pick {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.media-dir-modal {
  z-index: 100000;
}

body.media-dir-modal-open {
  overflow: hidden;
}

.media-url-input {
  min-height: 116px;
}

.media-result[data-mode="ok"] {
  border-color: rgba(20, 184, 166, 0.22);
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.9), rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.1), transparent 32%);
}

.media-result[data-mode="error"] {
  border-color: rgba(225, 29, 72, 0.2);
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.92), rgba(255, 255, 255, 0.82));
  color: #be123c;
}

.media-post-text {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.media-post-text p {
  margin: 0;
  color: #334155;
  white-space: pre-wrap;
  line-height: 1.75;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.media-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.media-preview {
  min-height: 180px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #111827, #312e81);
}

.media-preview-zoom {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 230px;
  display: block;
  object-fit: contain;
  background: #0f172a;
}

.media-file-placeholder {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.media-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  padding: 14px;
}

.media-card__body strong {
  color: var(--ink);
  font-size: 15px;
}

.media-card__body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.media-card__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.media-card__actions .btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  margin: 0;
  vertical-align: middle;
}

.media-card__actions .btn-primary {
  border: 1px solid transparent;
}

.media-preview-open {
  overflow: hidden;
}

.media-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 14, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.media-preview-modal[hidden] {
  display: none !important;
}

.media-preview-modal__img {
  max-width: min(96vw, 1280px);
  max-height: 90vh;
  display: block;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.38);
  cursor: zoom-out;
}

.media-preview-modal__close {
  position: fixed;
  top: 20px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.vault-workbench {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(22px, 2.5vw, 36px);
}

body[data-preview-tool="vault"] .preview-shell {
  width: min(1480px, calc(100% - 56px));
}

body[data-preview-tool="vault"] main {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 72px);
}

body[data-preview-tool="vault"] .section--tight {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-preview-tool="vault"] .tool-page-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-preview-tool="vault"] .vault-workbench {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-preview-tool="vault"] .jiyu-vault-status {
  flex-shrink: 0;
}

body[data-preview-tool="vault"] .vault-toolbar {
  flex-shrink: 0;
}

.vault-toolbar,
.vault-editor-head,
.vault-images-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.vault-toolbar {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.vault-toolbar strong,
.vault-images-head strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.vault-toolbar span,
.vault-images-head span,
.vault-parent-hint {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.vault-toolbar-actions {
  margin-top: 0;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.vault-search-input {
  width: min(220px, 42vw);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.vault-search-input:focus {
  border-color: rgba(236, 72, 153, 0.38);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.jiyu-vault-nav-item.is-search-hit {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.9));
  border-color: rgba(249, 115, 22, 0.28);
  color: #c2410c;
}

.vault-editor-head {
  align-items: center;
  flex-wrap: nowrap;
}

.vault-editor-head .vault-title-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.vault-editor-actions {
  flex-wrap: nowrap;
  margin-top: 0;
  flex-shrink: 0;
  gap: 8px;
}

.vault-table-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 280px;
  position: relative;
}

html.vault-ui-staging .vault-table-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px 8px;
  padding: 0 2px 2px;
}

html.vault-ui-staging .vault-table-editor__group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

html.vault-ui-staging .vault-table-editor__sep {
  width: 1px;
  height: 18px;
  background: rgba(23, 32, 51, 0.12);
  margin: 0 2px;
}

html.vault-ui-staging .vault-table-toolbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 28px;
  padding: 0 8px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

html.vault-ui-staging .vault-table-toolbtn:hover {
  background: #f9fafb;
  border-color: rgba(236, 72, 153, 0.28);
  color: #be185d;
}

html.vault-ui-staging .vault-table-toolbtn.is-active {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.34);
  color: #be185d;
}

html.vault-ui-staging .vault-table-toolbtn--danger {
  color: #be123c;
}

html.vault-ui-staging .vault-table-toolbtn--danger:hover {
  background: rgba(190, 18, 60, 0.08);
  border-color: rgba(190, 18, 60, 0.24);
}

.vault-table-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vault-table-editor__sep {
  width: 1px;
  height: 22px;
  background: rgba(23, 32, 51, 0.12);
  margin: 0 2px;
}

.vault-table-editor__wrap {
  overflow: auto;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  flex: 1 1 auto;
  min-height: 0;
}

.vault-table-editor__table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

html.vault-ui-staging .vault-table-editor__table {
  width: max-content;
  min-width: 0;
  max-width: none;
  table-layout: fixed;
}

.vault-table-editor__table th,
.vault-table-editor__table td {
  border: 1px solid rgba(23, 32, 51, 0.08);
  padding: 0;
  min-width: 120px;
  position: relative;
  background: #fff;
}

html.vault-ui-staging .vault-table-editor__table thead th[data-col] {
  width: 110px;
  min-width: 72px;
  max-width: none;
  background: #f3f4f6;
  padding: 0;
  position: relative;
  box-sizing: border-box;
}

html.vault-ui-staging .vault-table-editor__table td[data-col] {
  width: 110px;
  min-width: 72px;
  max-width: none;
  box-sizing: border-box;
}

html.vault-ui-staging .vault-table-editor__table thead .vault-table-col-letter {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 7px 0;
  background: transparent;
}

html.vault-ui-staging .vault-table-col-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}

html.vault-ui-staging .vault-table-col-resize::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}

html.vault-ui-staging .vault-table-col-resize:hover::after,
html.vault-table-col-resizing .vault-table-col-resize::after {
  background: rgba(236, 72, 153, 0.7);
}

html.vault-table-col-resizing,
html.vault-table-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

html.vault-ui-staging .vault-table-colhead {
  display: none;
}

.vault-table-editor__table .vault-table-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 42px;
  width: 42px;
  background: #f3f4f6;
}

.vault-table-editor__table .vault-table-rowhead {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 42px;
  width: 42px;
  background: #f8fafc;
  text-align: center;
}

html.vault-ui-staging .vault-table-col-letter,
html.vault-ui-staging .vault-table-row-num {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 0;
  width: 100%;
  min-height: 28px;
  cursor: pointer;
  box-shadow: none;
}

html.vault-ui-staging .vault-table-col-letter:hover,
html.vault-ui-staging .vault-table-row-num:hover {
  background: rgba(23, 32, 51, 0.06);
  color: #111827;
}

.vault-table-col-letter,
.vault-table-row-num {
  border: 0;
  background: #f3f4f6;
  color: #6b7280;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 0;
  cursor: pointer;
}

.vault-table-col-letter:hover,
.vault-table-row-num:hover {
  background: #e5e7eb;
  color: #111827;
}

.vault-table-editor__table th input,
.vault-table-editor__table td input,
html.vault-ui-staging .vault-table-cell {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
  line-height: 1.35;
  white-space: nowrap;
  field-sizing: content;
}

html.vault-ui-staging .vault-table-cell.is-wrap {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-height: 34px;
  overflow-y: hidden;
}

html.vault-ui-staging .vault-table-cell.is-bold {
  font-weight: 700;
}

html.vault-ui-staging .vault-table-cell.is-align-left {
  text-align: left;
}

html.vault-ui-staging .vault-table-cell.is-align-center {
  text-align: center;
}

html.vault-ui-staging .vault-table-cell.is-align-right {
  text-align: right;
}

.vault-table-editor__table th input,
html.vault-ui-staging thead .vault-table-cell {
  font-weight: 800;
  background: rgba(236, 72, 153, 0.06);
}

.vault-table-editor__table tbody tr:hover td {
  background: rgba(249, 250, 251, 0.9);
}

html.vault-ui-staging .vault-table-editor__table th.is-selected-cell,
html.vault-ui-staging .vault-table-editor__table td.is-selected-cell {
  background: rgba(236, 72, 153, 0.10);
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.28);
}

html.vault-ui-staging .vault-table-editor__table th.is-active-cell,
html.vault-ui-staging .vault-table-editor__table td.is-active-cell {
  box-shadow: inset 0 0 0 2px rgba(236, 72, 153, 0.55);
}

html.vault-ui-staging .vault-table-ctx {
  position: absolute;
  z-index: 40;
  min-width: 148px;
  padding: 6px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html.vault-ui-staging .vault-table-ctx.hidden,
html.vault-ui-staging .vault-table-ctx[hidden] {
  display: none !important;
}

html.vault-ui-staging .vault-table-ctx button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
}

html.vault-ui-staging .vault-table-ctx button:hover {
  background: rgba(236, 72, 153, 0.08);
  color: #be185d;
}

html.vault-ui-staging .vault-table-ctx hr {
  border: 0;
  border-top: 1px solid rgba(23, 32, 51, 0.08);
  margin: 4px 0;
}

html.theme-night.vault-ui-staging .vault-table-editor__table thead th[data-col],
html.theme-night.vault-ui-staging .vault-table-editor__table .vault-table-corner,
html.theme-night.vault-ui-staging .vault-table-editor__table .vault-table-rowhead {
  background: #241f2c !important;
  border-color: rgba(255, 255, 255, 0.1);
}

html.theme-night.vault-ui-staging .vault-table-col-letter,
html.theme-night.vault-ui-staging .vault-table-row-num {
  background: transparent !important;
  color: #b8afc4 !important;
  box-shadow: none !important;
}

html.theme-night.vault-ui-staging .vault-table-col-letter:hover,
html.theme-night.vault-ui-staging .vault-table-row-num:hover {
  background: #322b3d !important;
  color: #f3edf8 !important;
}

html.theme-night.vault-ui-staging .vault-table-editor__table th,
html.theme-night.vault-ui-staging .vault-table-editor__table td {
  background: #1f1b24;
}

html.theme-night.vault-ui-staging .vault-table-editor__table th.is-selected-cell,
html.theme-night.vault-ui-staging .vault-table-editor__table td.is-selected-cell {
  background: rgba(236, 72, 153, 0.16);
}

html.theme-night.vault-ui-staging .vault-table-ctx {
  background: #2a2433;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

html.theme-night.vault-ui-staging .vault-table-ctx button {
  color: #f3edf8;
}

html.theme-night.vault-ui-staging .vault-table-ctx button:hover {
  background: rgba(236, 72, 153, 0.16);
  color: #fbcfe8;
}

html.theme-night.vault-ui-staging .vault-table-ctx hr {
  border-top-color: rgba(255, 255, 255, 0.1);
}

html.theme-night.vault-ui-staging .vault-table-editor__sep {
  background: rgba(255, 255, 255, 0.14);
}

.vault-editor-actions .btn {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}

.jiyu-vault-status {
  min-height: 22px;
  margin: 12px 0;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.jiyu-vault-status[data-tone="error"] {
  color: #be123c;
}

.vault-layout {
  display: grid;
  grid-template-columns: minmax(230px, 286px) minmax(0, 1fr);
  gap: 22px;
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100dvh - 300px);
  max-height: 920px;
  overflow: hidden;
  align-items: stretch;
}

body[data-preview-tool="vault"] .vault-layout {
  min-height: 480px;
}

.vault-sidebar,
.vault-editor-wrap {
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.vault-sidebar {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  min-height: 0;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

.jiyu-vault-nav-empty {
  margin: 8px;
  color: var(--muted);
  font-size: 13px;
}

.jiyu-vault-nav-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.jiyu-vault-nav-row.is-dragging {
  opacity: 0.45;
}

.jiyu-vault-nav-caret,
.jiyu-vault-nav-caret-placeholder {
  width: 24px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.jiyu-vault-nav-item {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 14px;
  padding: 0 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  color: #374151;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.jiyu-vault-nav-item[aria-selected="true"] {
  border-color: rgba(236, 72, 153, 0.28);
  color: #be185d;
  background: linear-gradient(135deg, rgba(255, 241, 247, 0.94), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.08);
}

.vault-editor-wrap {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vault-editor {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.vault-empty {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.vault-empty strong {
  color: var(--ink);
  font-size: 22px;
}

.vault-title-input,
.vault-body-input {
  width: 100%;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.vault-title-input {
  min-height: 46px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 900;
}

.vault-body-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vault-body-shell:focus-within,
.vault-body-shell.is-dragover {
  border-color: rgba(236, 72, 153, 0.38);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.vault-body-shell.is-dragover {
  background: rgba(255, 251, 253, 0.98);
}

.vault-body-shell .vault-body-input {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  padding: 20px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.85;
  resize: none;
  background: transparent;
  overflow-y: auto;
}

.vault-body-shell .vault-image-grid--inline {
  flex-shrink: 0;
  overflow-y: auto;
}

.vault-body-shell .vault-image-grid--inline:not(:empty) {
  height: 148px;
  max-height: 148px;
  padding: 0 16px 16px;
}

.vault-body-shell .vault-body-editor {
  flex: 1 1 auto;
  min-height: 430px;
  padding: 20px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.85;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
  resize: none;
}

.vault-body-editor:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  white-space: pre-wrap;
  pointer-events: none;
}

.vault-inline-figure {
  display: block;
  margin: 14px 0;
  max-width: 100%;
}

.vault-inline-img {
  display: block;
  max-width: min(100%, 420px);
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  background: #fff;
  cursor: zoom-in;
  object-fit: contain;
}

.vault-inline-img.is-uploading {
  opacity: 0.55;
  filter: grayscale(0.15);
  cursor: wait;
}

.vault-images {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.72), rgba(255, 255, 255, 0.72));
}

.vault-image-drop {
  padding: 16px;
  border: 1px dashed rgba(20, 184, 166, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.vault-image-drop.is-dragover {
  border-color: rgba(236, 72, 153, 0.45);
  background: rgba(255, 241, 247, 0.8);
}

.vault-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.jiyu-vault-image-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 16px;
  background: #fff;
}

.jiyu-vault-image-card.is-uploading {
  opacity: 0.62;
}

.jiyu-vault-image-card__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.jiyu-vault-image-card img {
  width: 100%;
  height: 112px;
  display: block;
  object-fit: cover;
}

.jiyu-vault-image-card__name {
  padding: 7px 8px;
  overflow: hidden;
  color: #4b5563;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jiyu-vault-image-card__del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(190, 18, 60, 0.9);
  cursor: pointer;
}

.vault-modal[hidden],
.vault-modal.hidden,
.hidden {
  display: none !important;
}

.vault-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.vault-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 22, 0.36);
  backdrop-filter: blur(5px);
}

.vault-modal__box {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(88, 28, 55, 0.24);
}

.vault-modal__box h3 {
  margin: 0 0 8px;
}

.vault-modal__box p {
  margin: 0 0 16px;
  color: #4b5563;
}

.preview-pixel-modal-open {
  overflow: hidden;
}

.preview-pixel-img-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 14, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.preview-pixel-img-modal[hidden] {
  display: none !important;
}

.preview-pixel-img-modal__img {
  max-width: min(96vw, 1280px);
  max-height: 90vh;
  display: block;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.38);
  cursor: zoom-out;
}

.preview-pixel-img-modal__close {
  position: fixed;
  top: 20px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.vault-image-preview__box {
  width: min(860px, 100%);
}

.vault-image-preview__box img {
  max-width: 100%;
  max-height: 72vh;
  display: block;
  margin: 0 auto;
  border-radius: 18px;
}

.vault-image-preview__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.76);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 980px) {
  body[data-preview-tool="vault"] .preview-shell {
    width: min(100% - 28px, 1480px);
  }

  .vault-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .vault-sidebar {
    max-height: min(42dvh, 320px);
  }

  .vault-editor-wrap {
    max-height: none;
    min-height: 420px;
  }

  .vault-body-shell {
    height: 480px;
    min-height: 480px;
    max-height: 480px;
    flex: none;
  }

  .vault-empty {
    min-height: 480px;
    flex: none;
  }
}

/* ── 内测档案库：Docs 式左右分栏（不影响正式站） ── */
html.vault-ui-staging .tool-hero,
html.vault-ui-staging.preview-embed-mode .tool-hero {
  display: none !important;
}

html.vault-ui-staging body[data-preview-tool="vault"] {
  min-height: 100dvh;
}

html.vault-ui-staging body[data-preview-tool="vault"] main {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

html.vault-ui-staging body[data-preview-tool="vault"] .section--tight {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

html.vault-ui-staging body[data-preview-tool="vault"] .preview-shell.tool-page-grid {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

html.vault-ui-staging.preview-embed-mode,
html.vault-ui-staging.preview-embed-mode body[data-preview-tool="vault"] {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

html.vault-ui-staging.preview-embed-mode main {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

html.vault-ui-staging.preview-embed-mode .section--tight {
  height: 100%;
}

.vault-workbench--staging {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.vault-staging-app {
  display: grid;
  grid-template-columns: minmax(188px, 232px) minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  width: 100%;
  max-width: none;
  overflow: hidden;
  background: #f3f4f6;
}

html.vault-ui-staging.preview-embed-mode body[data-preview-tool="vault"] {
  width: 100%;
}

html.vault-ui-staging.preview-embed-mode body[data-preview-tool="vault"] main,
html.vault-ui-staging.preview-embed-mode body[data-preview-tool="vault"] .section--tight,
html.vault-ui-staging.preview-embed-mode body[data-preview-tool="vault"] .preview-shell.tool-page-grid {
  width: 100%;
  max-width: none;
  margin: 0;
}

html.vault-ui-staging.preview-embed-mode .vault-workbench--staging,
html.vault-ui-staging.preview-embed-mode .vault-staging-app {
  width: 100%;
  max-width: none;
}

/* 内测档案库：与画像素描同宽 1180 */
.poe-app .poe-embed-vault-staging .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat {
  position: relative;
  display: block;
  margin-bottom: 6px;
  padding: 0;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat .jiyu-vault-nav-item {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat.is-dragging .jiyu-vault-nav-item {
  cursor: grabbing;
}

html.vault-ui-staging .jiyu-vault-nav-drag-handle {
  display: none !important;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat:hover .jiyu-vault-nav-item:not([aria-selected="true"]) {
  border-color: rgba(236, 72, 153, 0.18);
  background: rgba(255, 255, 255, 0.94);
}

html.vault-ui-staging .jiyu-vault-nav-row--flat.is-dragging .jiyu-vault-nav-item {
  transform: translateY(-1px) scale(1.015);
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.22),
    0 14px 32px rgba(236, 72, 153, 0.22);
}

html.vault-ui-staging .jiyu-vault-nav.is-reordering .jiyu-vault-nav-row--flat:not(.is-dragging) {
  opacity: 0.68;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat.is-drag-over::before,
html.vault-ui-staging .jiyu-vault-nav-row--flat.is-drag-over-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.65);
  pointer-events: none;
  z-index: 3;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat.is-drag-over::before {
  top: -2px;
}

html.vault-ui-staging .jiyu-vault-nav-row--flat.is-drag-over-after::after {
  bottom: -2px;
}

html.vault-ui-staging .jiyu-vault-drag-ghost,
.jiyu-vault-drag-ghost--staging {
  position: fixed;
  top: -1000px;
  left: -1000px;
  z-index: 999999;
  max-width: 240px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 251, 253, 0.98), rgba(255, 236, 246, 0.96));
  border: 1px solid rgba(236, 72, 153, 0.38);
  color: #9d174d;
  font: 800 12px/1.35 ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  box-shadow: 0 16px 36px rgba(236, 72, 153, 0.28);
  transform: rotate(-1deg);
}

html.theme-night.vault-ui-staging .jiyu-vault-nav-row--flat:hover .jiyu-vault-nav-item:not([aria-selected="true"]) {
  border-color: rgba(236, 72, 153, 0.28);
  background: rgba(45, 36, 52, 0.72);
}

html.theme-night.vault-ui-staging .jiyu-vault-drag-ghost,
html.theme-night.vault-ui-staging .jiyu-vault-drag-ghost--staging {
  background: linear-gradient(135deg, rgba(45, 36, 52, 0.98), rgba(236, 72, 153, 0.14));
  border-color: rgba(236, 72, 153, 0.42);
  color: #fbcfe8;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

html.theme-night.vault-ui-staging .jiyu-vault-nav-row--flat.is-drag-over::before,
html.theme-night.vault-ui-staging .jiyu-vault-nav-row--flat.is-drag-over-after::after {
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.75);
}

.vault-staging-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  border: 0;
  border-right: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 12px 10px 10px;
}

.vault-staging-sidebar__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.vault-staging-sidebar__title {
  font-size: 12px;
  font-weight: 900;
  color: #6b7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vault-staging-sidebar__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.vault-staging-sidebar__btns .btn {
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.vault-staging-search {
  width: 100%;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.vault-staging-sidebar .jiyu-vault-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.vault-staging-main {
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
}

html.vault-ui-staging .vault-staging-doc-head {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(23, 32, 51, 0.06);
  overflow: visible;
}

html.vault-ui-staging .vault-staging-main__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 5px 12px;
  padding: 14px 14px 10px;
  overflow: visible;
  flex-shrink: 0;
}

html.vault-ui-staging .vault-staging-title {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  max-width: min(560px, calc(100% - 168px));
  min-width: 0;
  margin: 0 auto;
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  min-height: 40px;
  padding: 4px 10px;
  box-shadow: none;
  text-align: center;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

html.vault-ui-staging .vault-staging-title::placeholder {
  color: rgba(23, 32, 51, 0.34);
  font-weight: 600;
}

html.vault-ui-staging .vault-staging-title:focus {
  box-shadow: inset 0 -2px 0 rgba(236, 72, 153, 0.42);
  background: transparent;
}

html.vault-ui-staging .vault-staging-toolbar__actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

html.vault-ui-staging .vault-staging-status {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: start;
  margin: 0;
  padding: 0;
  min-height: 14px;
  max-width: 220px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  color: rgba(23, 32, 51, 0.48);
}

html.vault-ui-staging .vault-staging-status:empty {
  visibility: hidden;
  pointer-events: none;
}

html.vault-ui-staging .vault-staging-status[data-save-state="saved"] {
  color: #0d9488;
}

html.vault-ui-staging .vault-staging-status[data-save-state="dirty"] {
  color: #c2410c;
}

html.vault-ui-staging .vault-staging-status[data-tone="error"] {
  color: #be123c;
}

@media (max-width: 720px) {
  html.vault-ui-staging .vault-staging-main__bar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 12px 14px 10px;
    gap: 8px;
  }

  html.vault-ui-staging .vault-staging-title {
    grid-column: 1;
    grid-row: 1;
    max-width: 100%;
  }

  html.vault-ui-staging .vault-staging-toolbar__actions {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  html.vault-ui-staging .vault-staging-status {
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }
}

html.vault-ui-staging .vault-staging-toolbar__actions .btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: none;
}

.vault-staging-delete {
  color: #be123c;
}

.vault-staging-empty {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px;
}

.vault-staging-empty strong {
  font-size: 18px;
}

.vault-workbench--staging .vault-editor {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 14px 14px;
  gap: 0;
}

.vault-workbench--staging .vault-body-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vault-workbench--staging .vault-body-input {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 2px 0;
  line-height: 1.65;
  resize: none;
}

.vault-workbench--staging .vault-body-editor {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 2px 48px;
  line-height: 1.65;
  overflow-y: auto;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
}

html.vault-ui-staging .vault-inline-figure,
.vault-workbench--staging .vault-inline-figure {
  display: inline-block;
  position: relative;
  margin: 0;
  max-width: 100%;
  vertical-align: text-bottom;
  line-height: 0;
}

html.vault-ui-staging .vault-figure-del,
.vault-workbench--staging .vault-figure-del {
  display: none !important;
}

html.vault-ui-staging .vault-inline-img,
.vault-workbench--staging .vault-inline-img {
  display: inline-block;
  max-width: min(100%, 420px);
  max-height: 280px;
  width: auto;
  height: auto;
  margin: 0;
  vertical-align: text-bottom;
  line-height: 0;
  cursor: zoom-in;
}

html.vault-ui-staging .vault-figure-wrap,
.vault-workbench--staging .vault-figure-wrap {
  display: inline;
  vertical-align: text-bottom;
  max-width: 100%;
  white-space: normal;
  margin: 0;
  padding: 0;
}

html.vault-ui-staging .vault-side-pad,
.vault-workbench--staging .vault-side-pad {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

.vault-workbench--staging .vault-body-shell:focus-within,
.vault-workbench--staging .vault-body-shell.is-dragover {
  border: 0;
  box-shadow: none;
}

.vault-workbench--staging .vault-table-editor {
  flex: 1 1 auto;
  min-height: 0;
}

.jiyu-vault-nav-row--flat {
  margin-bottom: 8px;
}

.jiyu-vault-nav-row--flat .jiyu-vault-nav-item {
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

@media (max-width: 980px) {
  html.vault-ui-staging .vault-staging-app {
    grid-template-columns: minmax(148px, 176px) minmax(0, 1fr);
    height: 100%;
    max-height: none;
    overflow: hidden;
  }

  html.vault-ui-staging .vault-staging-sidebar {
    max-height: none;
  }

  html.vault-ui-staging .vault-staging-main,
  html.vault-ui-staging .vault-editor-wrap {
    min-height: 0;
    max-height: none;
  }

  html.vault-ui-staging .vault-body-shell,
  html.vault-ui-staging .vault-empty {
    min-height: 0;
    max-height: none;
    height: auto;
    flex: 1 1 auto;
  }
}

html.theme-night.vault-ui-staging .vault-staging-app {
  background: #17151c;
}

html.theme-night.vault-ui-staging .vault-staging-sidebar,
html.theme-night.vault-ui-staging .vault-staging-main {
  background: #1f1b24;
  border-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.vault-ui-staging .vault-staging-doc-head {
  border-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.vault-ui-staging .vault-staging-main__bar {
  border-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.vault-ui-staging .vault-staging-title {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none;
  color: #f3edf8 !important;
}

html.theme-night.vault-ui-staging .vault-staging-title::placeholder {
  color: rgba(243, 237, 248, 0.36);
}

html.theme-night.vault-ui-staging .vault-staging-title:focus {
  background: transparent !important;
  box-shadow: inset 0 -2px 0 rgba(236, 72, 153, 0.55);
}

html.theme-night.vault-ui-staging .vault-staging-title,
html.theme-night.vault-ui-staging .vault-workbench--staging .vault-body-input,
html.theme-night.vault-ui-staging .vault-workbench--staging .vault-body-editor {
  color: #f3edf8;
}

html.theme-night.vault-ui-staging .vault-body-editor:empty::before {
  color: rgba(184, 175, 196, 0.72);
}

html.theme-night.vault-ui-staging .vault-inline-img {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.55);
}

html.theme-night.vault-ui-staging .vault-staging-sidebar__title,
html.theme-night.vault-ui-staging .jiyu-vault-nav-empty,
html.theme-night.vault-ui-staging .vault-staging-empty,
html.theme-night.vault-ui-staging .vault-staging-empty span {
  color: #b8afc4;
}

html.theme-night.vault-ui-staging .vault-staging-empty strong {
  color: #f3edf8;
}

html.theme-night.vault-ui-staging .jiyu-vault-nav-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e8e0ef;
}

html.theme-night.vault-ui-staging .jiyu-vault-nav-item[aria-selected="true"] {
  background: rgba(236, 72, 153, 0.14);
  border-color: rgba(236, 72, 153, 0.32);
  color: #fbcfe8;
}

html.theme-night.vault-ui-staging .vault-search-input {
  background: #2a2433;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3edf8;
}

html.theme-night.vault-ui-staging .vault-search-input::placeholder {
  color: rgba(243, 237, 248, 0.42);
}

html.theme-night.vault-ui-staging .vault-staging-status[data-save-state="saved"] {
  color: #5eead4;
}

html.theme-night.vault-ui-staging .vault-staging-status[data-save-state="dirty"] {
  color: #fbbf24;
}

html.theme-night.vault-ui-staging .vault-staging-status[data-tone="error"] {
  color: #fda4af;
}

html.theme-night.vault-ui-staging .jiyu-vault-status {
  color: #86efac;
}

html.theme-night.vault-ui-staging .vault-table-editor__wrap {
  background: #2a2433;
  border-color: rgba(255, 255, 255, 0.12);
}

html.theme-night.vault-ui-staging .vault-table-editor__table th,
html.theme-night.vault-ui-staging .vault-table-editor__table td {
  border-color: rgba(255, 255, 255, 0.1);
}

html.theme-night.vault-ui-staging .vault-table-editor__table th input,
html.theme-night.vault-ui-staging .vault-table-editor__table td input,
html.theme-night.vault-ui-staging .vault-table-cell {
  color: #f3edf8;
}

html.theme-night.vault-ui-staging .vault-table-editor__table th input,
html.theme-night.vault-ui-staging thead .vault-table-cell {
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}

html.theme-night.vault-ui-staging .vault-table-editor__table td input,
html.theme-night.vault-ui-staging tbody .vault-table-cell {
  background: transparent;
}

html.theme-night.vault-ui-staging .vault-table-editor__table th input::placeholder,
html.theme-night.vault-ui-staging .vault-table-editor__table td input::placeholder,
html.theme-night.vault-ui-staging .vault-table-cell::placeholder {
  color: rgba(243, 237, 248, 0.38);
}

html.theme-night.vault-ui-staging .vault-table-editor__table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

html.theme-night.vault-ui-staging .vault-table-editor__table tbody tr:hover td input,
html.theme-night.vault-ui-staging .vault-table-editor__table tbody tr:hover .vault-table-cell {
  background: transparent;
}

html.theme-night.vault-ui-staging .vault-workbench--staging .btn:not(.btn-primary):not(.btn-green),
html.theme-night.vault-ui-staging .vault-table-editor__toolbar .btn,
html.theme-night.vault-ui-staging .vault-table-toolbtn {
  background: #3a3248 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #f3edf8 !important;
  box-shadow: none !important;
}

html.theme-night.vault-ui-staging .vault-workbench--staging .btn:not(.btn-primary):not(.btn-green):hover,
html.theme-night.vault-ui-staging .vault-table-editor__toolbar .btn:hover,
html.theme-night.vault-ui-staging .vault-table-toolbtn:hover {
  background: #453d5a !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: #fff !important;
}

html.theme-night.vault-ui-staging .vault-table-toolbtn.is-active {
  background: rgba(236, 72, 153, 0.22) !important;
  border-color: rgba(236, 72, 153, 0.4) !important;
  color: #fbcfe8 !important;
}

html.theme-night.vault-ui-staging .vault-workbench--staging .btn-primary {
  color: #fff !important;
}

html.theme-night.vault-ui-staging .vault-staging-delete {
  color: #fda4af !important;
  background: rgba(190, 18, 60, 0.14) !important;
  border-color: rgba(251, 113, 133, 0.32) !important;
}

html.theme-night.vault-ui-staging .vault-staging-delete:hover {
  background: rgba(190, 18, 60, 0.24) !important;
  color: #ffe4e6 !important;
}

/* 内测档案库确认弹窗：夜间取消按钮（避免白底 + 浅字不可见） */
html.theme-night.vault-ui-staging .vault-modal__box .tool-actions .btn:not(.btn-primary):not(.btn-green),
html.theme-night.vault-ui-staging .vault-modal__box .btn-ghost,
html.theme-night.vault-ui-staging .vault-modal__box #jiyu-vault-confirm-cancel {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #e8edf3 !important;
  box-shadow: none !important;
}

html.theme-night.vault-ui-staging .vault-modal__box .tool-actions .btn:not(.btn-primary):not(.btn-green):hover,
html.theme-night.vault-ui-staging .vault-modal__box .btn-ghost:hover,
html.theme-night.vault-ui-staging .vault-modal__box #jiyu-vault-confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.13) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #f8fafc !important;
}

html.theme-night.vault-ui-staging .vault-modal__box .btn-primary,
html.theme-night.vault-ui-staging .vault-modal__box #jiyu-vault-confirm-ok {
  color: #fff !important;
}

html.theme-night.vault-ui-staging .vault-modal__backdrop {
  background: rgba(8, 10, 16, 0.62);
}

.vault-workbench--staging.vault-staging-is-empty .vault-staging-doc-head,
.vault-workbench--staging.vault-staging-is-empty #jiyu-vault-editor {
  display: none !important;
}

.vault-workbench--staging.vault-staging-is-empty .vault-staging-empty {
  display: grid !important;
}

@media (max-width: 860px) {
  .fx-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fx-form-grid > .tool-field:first-child,
  .fx-action-field {
    grid-column: 1 / -1;
  }

  .fx-workbench .tool-result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .fx-workbench .tool-result-grid {
    grid-template-columns: 1fr;
  }
}

.tool-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(23,32,51,0.07);
}

.tool-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
}

.tool-stat span {
  color: var(--muted);
  font-size: 12px;
}

.tool-list {
  display: grid;
  gap: 10px;
}

.tool-list-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(23,32,51,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}

.tool-iframe {
  width: 100%;
  min-height: 680px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(23,32,51,0.08);
  transition: opacity 0.16s ease;
}

.tool-iframe.is-ready {
  opacity: 1;
}

body[data-preview-tool="image-edit"] .tool-iframe--image-edit {
  min-height: 760px;
}

body[data-preview-tool="image-edit"] .tool-workbench {
  padding: clamp(18px, 2.4vw, 28px);
}

body[data-preview-tool="image-edit"] .tool-embed-actions {
  margin-bottom: 12px;
}

html.preview-embed-mode--image-edit {
  --image-edit-embed-height: 1280px;
  height: auto;
  min-height: 0;
  overflow: visible;
}

html.preview-embed-mode--image-edit body {
  margin: 0;
  overflow: visible;
  height: auto;
  min-height: 0;
  background: transparent !important;
}

html.preview-embed-mode--image-edit .image-edit-embed-host {
  margin: 0;
  padding: 0;
  overflow: visible;
  height: auto;
  min-height: 0;
}

html.preview-embed-mode--image-edit .tool-iframe--image-edit-bare {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  opacity: 1;
  box-shadow: none;
}

html.theme-night.preview-embed-mode--image-edit body,
html.theme-night.preview-embed-mode--image-edit .tool-iframe--image-edit-bare {
  background: transparent !important;
}

html.preview-embed-mode--kana {
  --kana-embed-height: 950px;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html.preview-embed-mode--kana body {
  margin: 0;
  overflow: visible;
  background: transparent !important;
}

html.preview-embed-mode--kana .kana-embed-host {
  margin: 0;
  padding: 0;
  overflow: visible;
}

html.preview-embed-mode--kana .tool-iframe--kana-bare {
  display: block;
  width: 100%;
  height: var(--kana-embed-height);
  min-height: var(--kana-embed-height);
  border: 0;
  border-radius: 0;
  background: transparent !important;
  opacity: 1;
  box-shadow: none;
}

html.theme-night.preview-embed-mode--kana body,
html.theme-night.preview-embed-mode--kana .tool-iframe--kana-bare {
  background: transparent !important;
}

/* 画像素描嵌入：内容撑开高度，滚动交给最外层 Poe 面板 */
html.preview-embed-mode--pixel-sketch,
html.preview-embed-mode--pixel-sketch body {
  height: auto;
  min-height: 100%;
  margin: 0;
  /* 高度由内层 postMessage 撑开，中间层本身不出现滚动条 */
  overflow: hidden;
  background: transparent !important;
}

html.preview-embed-mode--pixel-sketch .pixel-sketch-embed-host {
  display: block;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

html.preview-embed-mode--pixel-sketch .pixel-sketch-bare-wrap {
  display: block;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

html.preview-embed-mode--pixel-sketch .tool-iframe--pixel-sketch-bare {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  opacity: 1;
  box-shadow: none;
}

/* 内测：中间层随外层定高，不跟内容二次撑高 */
html.preview-embed-mode--pixel-sketch.pixel-sketch-stg-host,
html.preview-embed-mode--pixel-sketch.pixel-sketch-stg-host body {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

html.preview-embed-mode--pixel-sketch.pixel-sketch-stg-host .pixel-sketch-embed-host,
html.preview-embed-mode--pixel-sketch.pixel-sketch-stg-host .pixel-sketch-bare-wrap {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

html.preview-embed-mode--pixel-sketch.pixel-sketch-stg-host .tool-iframe--pixel-sketch-bare {
  height: 100% !important;
  min-height: 100% !important;
}

html.theme-night.preview-embed-mode--pixel-sketch body,
html.theme-night.preview-embed-mode--pixel-sketch .pixel-sketch-embed-host,
html.theme-night.preview-embed-mode--pixel-sketch .tool-iframe--pixel-sketch-bare {
  background: transparent !important;
}

.tool-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.second-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.second-tier {
  min-height: 54px;
  padding: 10px 8px;
  border: 1px solid rgba(225, 29, 138, 0.16);
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  color: #4b5563;
  cursor: pointer;
  font: inherit;
  transition: 0.18s ease;
}

.second-tier strong,
.second-tier span,
.second-tier-rate {
  display: block;
}

.second-tier-rate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 4px;
}

.second-tier-rate__input {
  width: 56px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid rgba(225, 29, 138, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.second-tier-rate__input:focus {
  outline: none;
  border-color: rgba(225, 29, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.second-tier span:not(.second-tier-rate) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.second-tier.is-on,
.second-tier:hover {
  transform: translateY(-1px);
  border-color: rgba(225, 29, 138, 0.32);
  background: linear-gradient(180deg, #fff, #fff1f7);
  box-shadow: 0 14px 34px rgba(225, 29, 138, 0.12);
}

.second-result-card {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 24px;
  background: rgba(255,255,255,0.78);
}

.second-result-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.second-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.second-result-table th,
.second-result-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.07);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.second-result-table th:first-child,
.second-result-table td:first-child {
  text-align: left;
}

.second-result-table thead th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.second-result-table tfoot td {
  border-bottom: none;
  color: #9d174d;
  font-size: 16px;
  font-weight: 900;
}

.second-profit-label {
  display: inline-block;
  margin-right: 12px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.second-result-table tfoot strong {
  color: #9d174d;
  font: inherit;
}

.calc-display {
  min-height: 104px;
  padding: 20px 24px;
  border-radius: 28px;
  background: #111827;
  color: #fff;
  text-align: right;
  overflow: hidden;
}

.calc-display small {
  display: block;
  min-height: 24px;
  color: rgba(255,255,255,0.58);
  font-size: 15px;
}

.calc-display strong {
  display: block;
  font-size: 46px;
  line-height: 1.1;
}

.calc-workbench {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: 42px;
  box-shadow: 0 34px 95px rgba(84, 54, 25, 0.16);
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.calc-key {
  min-height: 72px;
  border: 1px solid rgba(23,32,51,0.08);
  border-radius: 24px;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
}

.calc-key.is-op,
.calc-key.is-eq {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.calc-key.is-zero {
  grid-column: span 2;
}

.tool-embed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.hero {
  padding: 56px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #be185d;
  background: rgba(236, 72, 153, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--brand);
}

.lead {
  margin: 0;
  max-width: 680px;
  color: #4b5563;
  font-size: 18px;
}

.hero-actions,
.section-actions,
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.btn-primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.btn-green {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(236, 72, 153, 0.15);
  border-radius: 34px;
  background: linear-gradient(160deg, rgba(255,255,255,0.94), rgba(255,245,249,0.9));
  box-shadow: var(--shadow);
}

.chat-preview {
  display: grid;
  gap: 14px;
}

.bubble {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  font-size: 14px;
}

.bubble.user {
  justify-self: end;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.bubble.ai {
  justify-self: start;
  border-top-left-radius: 6px;
}

.bubble small {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.82);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}

.metric strong {
  display: block;
  font-size: 20px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding: 36px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
}

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

.card-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card-grid--four .card {
  padding: 20px;
  min-width: 0;
}

.card-grid--four .card h3 {
  font-size: 18px;
}

.card-grid--four .card p {
  font-size: 13px;
  line-height: 1.6;
}

.card-grid--four .tag-row {
  gap: 6px;
}

.card-grid--four .tag {
  padding: 4px 8px;
  font-size: 11px;
}

.client-download-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.client-download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 20px;
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  box-shadow: 0 24px 70px rgba(84, 54, 25, 0.12);
}

.client-download-panel--desktop {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 243, 255, 0.78)),
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.16), transparent 38%);
  border-color: rgba(199, 210, 254, 0.72);
}

.client-download-panel--rpa {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 242, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.14), transparent 36%);
}

.client-download-panel h3 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.client-download-panel p {
  margin: 0;
  max-width: 620px;
  color: #4b5563;
}

.client-download-panel__note {
  margin-top: 0.75rem !important;
  font-size: 13px;
  color: #6b7280 !important;
}

.client-download-actions {
  display: grid;
  gap: 12px;
}

.client-download-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 18px 20px;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
}

.client-download-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 12%, rgba(255,255,255,0.34), transparent 32%);
  pointer-events: none;
}

.client-download-card strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
  line-height: 1.2;
}

.client-download-card span {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
}

.client-download-panel--desktop .client-download-card--win {
  background: linear-gradient(135deg, #4338ca, #6366f1);
}

.client-download-panel--desktop .client-download-card--mac {
  background: linear-gradient(135deg, #312e81, #a855f7);
}

.client-download-panel--rpa .client-download-card--win {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.client-download-panel--rpa .client-download-card--mac {
  background: linear-gradient(135deg, #111827, #ec4899);
}

.client-download-card:hover {
  transform: translateY(-2px);
}

/* legacy aliases — keep dialog styles on rpa-download-* */
.rpa-download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 242, 0.72)),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.14), transparent 36%);
  box-shadow: 0 24px 70px rgba(84, 54, 25, 0.12);
}

.rpa-download-panel h3 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.rpa-download-panel p {
  margin: 0;
  max-width: 620px;
  color: #4b5563;
}

.rpa-download-actions {
  display: grid;
  gap: 12px;
}

.rpa-download-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 18px 20px;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.13);
}

.rpa-download-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 12%, rgba(255,255,255,0.34), transparent 32%);
  pointer-events: none;
}

.rpa-download-card strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
  line-height: 1.2;
}

.rpa-download-card span {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
}

.rpa-download-card--win {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rpa-download-card--mac {
  background: linear-gradient(135deg, #111827, #ec4899);
}

.rpa-download-card:hover {
  transform: translateY(-2px);
}

.rpa-download-dialog[hidden] {
  display: none !important;
}

.rpa-download-dialog {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.rpa-download-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 22, 0.36);
  backdrop-filter: blur(5px);
}

.rpa-download-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 30px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,247,250,0.94)),
    radial-gradient(circle at 100% 0%, rgba(20,184,166,0.13), transparent 34%);
  box-shadow: 0 30px 90px rgba(88, 28, 55, 0.24);
}

.rpa-download-dialog__head,
.rpa-download-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rpa-download-dialog__head {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 18px;
}

.rpa-download-dialog__head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #9d174d;
  background: #fff1f7;
  font-size: 22px;
  cursor: pointer;
}

.rpa-download-dialog__body {
  display: grid;
  gap: 12px;
  color: #445066;
  line-height: 1.75;
}

.rpa-download-dialog__body p {
  margin: 0;
}

.rpa-download-dialog__ok {
  color: #0f766e;
  font-weight: 900;
}

.rpa-download-dialog__warn {
  color: #be123c;
  font-weight: 900;
}

.rpa-download-dialog__note {
  color: var(--muted);
  font-size: 14px;
}

.rpa-license-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(20,184,166,0.18);
  border-radius: 18px;
  background: rgba(240,253,250,0.9);
}

.rpa-license-box span {
  color: #064e3b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 900;
  word-break: break-all;
}

.rpa-license-box button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.rpa-download-dialog__actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.06);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.card p {
  margin: 0;
  color: #4b5563;
}

.tool-action-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tool-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236, 72, 153, 0.28);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.09);
}

.card .tag-row,
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag,
.tool-pill {
  padding: 7px 10px;
  border-radius: 999px;
  color: #6b21a8;
  background: rgba(168, 85, 247, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.value-panel {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
}

.compare {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.compare-row > div {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.compare-row:last-child > div {
  border-bottom: 0;
}

.compare-head > div {
  font-weight: 900;
  background: #fff7ed;
}

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

.tool-card {
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.tool-card strong {
  display: block;
  margin-bottom: 8px;
}

.tool-card span {
  color: var(--muted);
  font-size: 13px;
}

.ai-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  padding: 28px 0 44px;
}

.preview-ai-page .ai-layout {
  padding-top: 32px;
}

.side-panel,
.chat-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 18px;
  align-self: start;
}

.mode-card {
  display: grid;
  place-items: center;
  width: 100%;
  margin-bottom: 10px;
  min-height: 76px;
  padding: 18px;
  border: 1px solid transparent;
  border-radius: 18px;
  text-align: center;
  background: #fff;
  cursor: pointer;
}

.mode-card.active {
  border-color: rgba(236, 72, 153, 0.35);
  background: #fff1f7;
}

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

.mode-card strong {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.mode-card span {
  color: var(--muted);
  font-size: 13px;
}

.chat-panel {
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fff7ed, #fff1f7);
}

.chat-head h1 {
  margin: 0;
  font-size: 23px;
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-clear-btn {
  min-width: 82px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #0f766e;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.95), rgba(103, 232, 249, 0.86));
  box-shadow: 0 14px 32px rgba(20, 184, 166, 0.22);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chat-context-btn {
  min-width: 112px;
  color: #be185d;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 247, 0.9));
  box-shadow: 0 12px 28px rgba(190, 24, 93, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.22);
}

.chat-clear-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(20, 184, 166, 0.28);
}

.chat-context-btn:hover {
  box-shadow: 0 16px 34px rgba(190, 24, 93, 0.18);
}

.temp-mail-workbench {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.temp-mail-card--featured {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.88));
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.14);
}

.temp-mail-card--chitu .temp-mail-card-head strong {
  color: #c2410c;
}

.temp-mail-steps {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.temp-mail-steps code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 13px;
}

.temp-mail-otp--code {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.tool-field .pwd-wrap {
  position: relative;
  display: block;
}

.tool-field .pwd-wrap .tool-input[type="password"],
.tool-field .pwd-wrap .tool-input.is-revealed {
  padding-right: 42px;
  width: 100%;
}

.tool-field .pwd-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.tool-field .pwd-eye:hover {
  color: var(--accent, #db2777);
}

.tool-field .pwd-eye svg {
  width: 18px;
  height: 18px;
}

.tool-field .pwd-eye .icon-on {
  display: block;
}

.tool-field .pwd-eye .icon-off {
  display: none;
}

.tool-field .pwd-eye.is-on .icon-on {
  display: none;
}

.tool-field .pwd-eye.is-on .icon-off {
  display: block;
}

.temp-mail-url-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.temp-mail-url-btn {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #9d174d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  word-break: break-all;
  box-shadow: 0 10px 28px rgba(244, 114, 182, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.temp-mail-url-btn:hover {
  border-color: rgba(219, 39, 119, 0.35);
  background: rgba(255, 241, 247, 0.95);
  transform: translateY(-1px);
}

.temp-mail-links-compact .temp-mail-card-head {
  margin-bottom: 10px;
}

.temp-mail-status {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 114, 182, 0.16);
  border-radius: 18px;
  color: #9f1239;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 241, 247, 0.72));
  font-size: 13px;
  font-weight: 800;
}

.temp-mail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.temp-mail-card {
  padding: 20px;
  border: 1px solid rgba(244, 114, 182, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 24px 60px rgba(244, 114, 182, 0.12);
}

.temp-mail-card--primary {
  grid-row: span 2;
}

.temp-mail-card-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.temp-mail-card-head strong {
  font-size: 18px;
  color: var(--ink);
}

.temp-mail-card-head span,
.temp-mail-note,
.temp-mail-check,
.temp-mail-card .muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.temp-mail-form {
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr);
}

.temp-mail-actions {
  margin-top: 12px;
}

.temp-mail-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  font-weight: 800;
}

.temp-mail-note {
  margin: 12px 0 0;
}

.temp-mail-list,
.temp-mail-detail,
.temp-mail-otp {
  margin-top: 12px;
}

.temp-mail-list {
  overflow-x: auto;
  border-radius: 16px;
}

.temp-mail-list table {
  min-width: 520px;
}

.temp-mail-detail pre,
.temp-mail-card pre {
  border: 1px solid rgba(244, 114, 182, 0.14);
  background: rgba(255, 247, 250, 0.72) !important;
}

.temp-mail-frame {
  width: 100%;
  min-height: 460px;
  margin-top: 12px;
  border: 1px solid rgba(244, 114, 182, 0.16);
  border-radius: 18px;
  background: #fff;
}

.temp-mail-field-gap {
  margin-top: 16px;
}

.temp-mail-links {
  margin-top: 18px;
}

.temp-mail-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.temp-mail-link-grid a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 114, 182, 0.14);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.temp-mail-link-grid a:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 72, 153, 0.28);
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.12);
}

.temp-mail-link-grid strong {
  color: #be185d;
  font-size: 14px;
}

.temp-mail-link-grid span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 920px) {
  .temp-mail-grid,
  .temp-mail-link-grid {
    grid-template-columns: 1fr;
  }

  .temp-mail-card--primary {
    grid-row: auto;
  }

  .temp-mail-form {
    grid-template-columns: 1fr;
  }
}

.chat-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-window {
  min-height: 520px;
  padding: 24px;
  background: linear-gradient(180deg, #fff, #fffbf7);
}

.chat-window[hidden] {
  display: none !important;
}

.message {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.message-body {
  display: grid;
  gap: 7px;
  max-width: min(760px, 82%);
}

.message.user {
  justify-content: flex-end;
}

.message.user .message-body {
  justify-items: end;
}

.avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #16a34a);
  font-weight: 900;
}

.message.user .avatar {
  order: 2;
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.message .bubble {
  margin: 0;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.86;
}

.message-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: .74;
  transform: translateY(-2px);
  transition: opacity .16s ease, transform .16s ease;
}

.message:hover .message-tools,
.message:focus-within .message-tools {
  opacity: 1;
  transform: translateY(0);
}

.message-tool {
  border: 1px solid rgba(225, 29, 138, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  color: #9d174d;
  background: rgba(255,255,255,0.86);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(17,24,39,0.05);
}

.message-tool:hover {
  border-color: rgba(225, 29, 138, 0.32);
  background: #fff1f7;
}

.message-edit-dialog[hidden] {
  display: none !important;
}

html.message-edit-open,
body.message-edit-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.message-edit-dialog {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  overscroll-behavior: none;
}

.message-edit-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 18, 22, 0.36);
  backdrop-filter: blur(4px);
  touch-action: none;
}

.message-edit-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 32px));
  border: 1px solid rgba(225, 29, 138, 0.16);
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,247,250,0.96));
  box-shadow: 0 28px 90px rgba(88, 28, 55, 0.28);
  overscroll-behavior: contain;
  contain: layout paint;
}

.message-edit-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 18px;
}

.message-edit-dialog__x {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #9d174d;
  background: #fff1f7;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.message-edit-dialog textarea {
  width: 100%;
  min-height: 190px;
  max-height: 44vh;
  resize: vertical;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid rgba(225, 29, 138, 0.18);
  border-radius: 20px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
  font: inherit;
  line-height: 1.75;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.message-edit-dialog textarea:focus {
  border-color: rgba(225, 29, 138, 0.42);
  box-shadow: 0 0 0 4px rgba(225, 29, 138, 0.1);
}

.message-edit-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.message-edit-dialog__btn {
  min-width: 88px;
  border: 1px solid rgba(225, 29, 138, 0.16);
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease;
}

.message-edit-dialog__btn:active,
.message-edit-dialog__x:active {
  transform: translateY(2px) scale(0.98);
}

.message-edit-dialog__btn.soft {
  color: #9d174d;
  background: #fff;
}

.message-edit-dialog__btn.primary {
  border-color: rgba(20, 184, 166, 0.35);
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #22d3ee);
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.2);
}

.message.user .bubble {
  border-top-right-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.preview-ai-page .message .bubble {
  padding: 18px 20px;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.preview-ai-page .message.ai .bubble {
  color: #172033;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 248, 0.94)),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.08), transparent 34%);
}

.preview-ai-page .message.user .bubble {
  line-height: 1.78;
}

.composer {
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  font: inherit;
  outline: none;
}

.composer textarea:focus {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.preview-ai-page .ai-layout {
  min-height: calc(100vh - 70px);
  align-items: start;
}

.preview-ai-page .chat-panel {
  height: calc(100vh - 118px);
  min-height: 720px;
  max-height: 920px;
  display: flex;
  flex-direction: column;
}

.preview-ai-page .chat-head {
  flex: 0 0 auto;
}

.preview-ai-page .chat-window {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.preview-ai-page .composer {
  flex: 0 0 auto;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.composer-tools[hidden],
.composer-image-preview[hidden],
.composer-txt-preview[hidden] {
  display: none !important;
}

.composer-image-btn {
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  color: #be185d;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 247, 0.9));
  box-shadow: 0 12px 24px rgba(236, 72, 153, 0.1);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.composer-image-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(236, 72, 153, 0.16);
}

.composer-image-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.composer-image-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  max-width: 240px;
  padding: 7px 32px 7px 7px;
  border: 1px solid rgba(236, 72, 153, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.08);
}

.composer-image-item img {
  width: 56px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

.composer-image-item span {
  overflow: hidden;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-image-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  color: #be185d;
  background: rgba(244, 114, 182, 0.14);
  cursor: pointer;
  font-weight: 900;
}

.message-image-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.message.user .message-image-strip {
  justify-content: flex-end;
}

.message-image-thumb {
  display: grid;
  gap: 5px;
  width: 118px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  color: #fff;
  background: rgba(225, 29, 138, 0.18);
  cursor: zoom-in;
}

.message-image-thumb img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.message-image-thumb span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(14px);
}

.chat-image-preview-modal[hidden] {
  display: none;
}

.chat-image-preview-modal img {
  max-width: min(1120px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.chat-image-preview-close {
  position: fixed;
  top: 22px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
}

.preview-ai-page .composer textarea {
  min-height: 52px;
  max-height: min(40vh, 320px);
  resize: none;
  overflow-y: auto;
  line-height: 1.55;
  field-sizing: content;
}

.form-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.form-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  outline: none;
}

.form-card textarea {
  min-height: 132px;
  resize: vertical;
}

.result-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid var(--line);
}

.process-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
}

.process-list b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.price-grid--single {
  width: min(720px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.06);
}

.price-card.is-featured {
  border-color: rgba(236, 72, 153, 0.32);
  background: linear-gradient(180deg, #fff, #fff1f7);
}

.price-card h3 {
  margin: 0 0 6px;
}

.member-benefits {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.member-benefits li {
  position: relative;
  padding-left: 18px;
}

.member-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #10b981;
  font-weight: 900;
}

.price-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card .btn-pick-tier {
  margin-top: 16px;
  width: 100%;
}

/* 可点击选择的套餐卡片 */
.price-grid--triple .price-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.price-grid--triple .price-card:focus-visible {
  outline: 3px solid rgba(236, 72, 153, 0.45);
  outline-offset: 2px;
}

.price-card__for {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 800;
  color: #ec4899;
}

.price-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ec4899;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.price-card.is-selected {
  border-color: #ec4899;
  box-shadow: 0 0 0 2px #ec4899, 0 18px 44px rgba(236, 72, 153, 0.22);
  transform: translateY(-2px);
}

.price-card.is-selected .price-card__check {
  display: inline-block;
}

.price-card.is-selected .btn-pick-tier {
  background: #ec4899;
  border-color: #ec4899;
  color: #fff;
}

/* 表单内「已选套餐」摘要条 */
.member-selected-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(236, 72, 153, 0.32);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fff1f7);
}

.member-selected-tier__main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.member-selected-tier__eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: #9ca3af;
}

.member-selected-tier__main strong {
  font-size: 17px;
  font-weight: 900;
  color: #be185d;
}

.member-selected-tier__price {
  font-size: 13px;
  font-weight: 800;
  color: #4b5563;
}

.member-change-tier {
  flex: none;
  padding: 7px 12px;
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: 999px;
  background: #fff;
  color: #be185d;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.member-change-tier:hover {
  background: #fff1f7;
}

.member-redeem-hint {
  margin: 0;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafafa;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.member-redeem-hint a {
  color: #be185d;
  font-weight: 800;
  text-decoration: underline;
}

.tier-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ec4899;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.member-tier-picker {
  display: grid;
  gap: 8px;
  margin: 4px 0 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafa;
}

.member-tier-picker legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #4b5563;
}

.member-tier-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
}

.member-upgrade-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(236, 72, 153, 0.32);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fff1f7);
}

.member-upgrade-card strong {
  font-size: 14px;
  color: #be185d;
}

.member-upgrade-card span {
  font-size: 13px;
  color: #4b5563;
  font-weight: 600;
}

.member-month-card {
  display: grid;
  gap: 12px;
}

.member-month-picker {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.member-month-picker input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  font: inherit;
  font-weight: 900;
  outline: none;
}

.member-month-picker input:focus {
  border-color: rgba(236,72,153,0.38);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.1);
}

.member-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(17,24,39,0.08);
}

.member-total span {
  color: var(--muted);
  font-weight: 800;
}

.member-total strong {
  font-size: 28px;
  line-height: 1;
}

.price {
  margin: 10px 0;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.price span {
  font-size: 15px;
  color: var(--muted);
}

.check-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: #4b5563;
  font-size: 14px;
}

.check-list li {
  margin: 7px 0;
}

.check-list li::before {
  content: "✓";
  margin-right: 7px;
  color: var(--green);
  font-weight: 900;
}

.translate-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 38px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}

.translate-pane {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.72);
}

.translate-pane + .translate-pane {
  border-left: 1px solid var(--line);
}

.translate-pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,247,237,0.86), rgba(255,241,247,0.72));
}

.translate-lang {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  outline: none;
}

.translate-pane textarea,
.translate-output {
  flex: 1;
  width: 100%;
  border: 0;
  padding: 28px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 20px;
  line-height: 1.75;
  outline: none;
  resize: none;
}

.translate-output {
  color: #233044;
  white-space: pre-wrap;
}

.translate-pane__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.translate-tone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.translate-tone {
  border: 1px solid rgba(225, 29, 138, 0.16);
  border-radius: 999px;
  padding: 7px 11px;
  color: #9d174d;
  background: linear-gradient(135deg, rgba(225, 29, 138, 0.09), rgba(255, 106, 26, 0.07));
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.translate-toolbar {
  display: flex;
  justify-content: center;
  margin: -18px 0 20px;
}

.swap-btn {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 42px rgba(225, 29, 138, 0.2);
  font-size: 22px;
  cursor: pointer;
}

.translate-workbench {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(245, 236, 255, 0.78), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 82% 0%, rgba(225, 29, 138, 0.12), transparent 30%);
  box-shadow: var(--shadow);
}

.translate-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(237, 226, 255, 0.55);
}

.translate-select-pill {
  min-width: 180px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 250, 236, 0.9);
  font: inherit;
  font-weight: 900;
  outline: none;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.translate-swap-inline {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

.translate-dual-stack {
  display: grid;
  gap: 0;
}

.translate-dual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 330px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.translate-dual-row:last-child {
  border-bottom: 0;
}

.translate-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  background: rgba(255, 255, 255, 0.68);
}

.translate-cell + .translate-cell {
  border-left: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(241, 232, 255, 0.45);
}

.translate-cell-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  color: #445066;
  font-size: 14px;
  font-weight: 900;
}

.translate-cell textarea,
.translate-cell-output {
  flex: 1;
  width: 100%;
  border: 0;
  padding: 18px 22px 76px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 18px;
  line-height: 1.8;
  outline: none;
  resize: none;
}

.translate-cell-output {
  color: #273247;
  white-space: pre-wrap;
}

.translate-cell-tools {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 250, 236, 0.92);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

.translate-mini-btn {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255,255,255,0.78);
  color: #6b4b16;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.translate-mini-btn.is-primary {
  color: #fff;
  background: #1f2937;
}

.translate-copy-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-height: 38px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 250, 236, 0.95);
  color: #6b4b16;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

.translate-hint {
  color: #9aa3b2;
  font-size: 13px;
  font-weight: 700;
}

.translate-popover {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 30;
  width: min(420px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 80px));
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 90px rgba(17, 24, 39, 0.22);
  backdrop-filter: blur(20px);
}

.translate-popover__head {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.translate-popover__head input,
.translate-phrase-add textarea {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.translate-popover__head button {
  width: 36px;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
}

.translate-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
}

.translate-emoji-grid button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: #fff7ed;
  font-size: 20px;
  cursor: pointer;
}

.translate-phrase-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 12px;
}

.translate-phrase-list button {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fffaf4;
  text-align: left;
  white-space: pre-line;
  cursor: pointer;
}

.translate-phrase-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.translate-phrase-add textarea {
  min-height: 58px;
  resize: vertical;
}

.translate-popover__foot {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
}

.full-feature-frame {
  position: relative;
  overflow: hidden;
  height: min(760px, calc(100vh - 190px));
  min-height: 610px;
  padding: clamp(10px, 1.6vw, 18px);
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,244,250,0.56)),
    radial-gradient(circle at 88% 6%, rgba(225, 29, 138, 0.13), transparent 34%),
    radial-gradient(circle at 12% 100%, rgba(255, 106, 26, 0.11), transparent 30%);
  box-shadow: 0 36px 100px rgba(76, 48, 30, 0.16);
  backdrop-filter: blur(18px);
}

.full-feature-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 30px;
  display: block;
  background: transparent;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.preview-translate-page .full-feature-frame {
  height: calc(100vh - 58px);
  min-height: 0;
  max-height: none;
  padding: 4px;
  border-radius: 26px;
}

.preview-translate-page .full-feature-frame iframe {
  border-radius: 20px;
}

.full-feature-frame.is-ready iframe {
  opacity: 1;
}

.frame-loading {
  position: absolute;
  inset: clamp(10px, 1.6vw, 18px);
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 30px;
  color: #9d174d;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,244,250,0.82)),
    radial-gradient(circle at 88% 8%, rgba(225, 29, 138, 0.12), transparent 34%);
  font-weight: 900;
}

.frame-loading[hidden] {
  display: none;
}

.footer {
  padding: 34px 0 54px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (min-width: 901px) {
  .nav-links {
    justify-content: center;
    gap: 2px;
  }

  .nav-links a {
    padding: 7px 8px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .preview-nav__inner {
    gap: 6px;
  }

  .brand {
    max-width: 38px;
    gap: 0;
    overflow: hidden;
  }

  .brand > span:not(.brand-mark) {
    display: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 0;
    font-size: 12px;
  }

  .nav-links a {
    padding: 6px 5px;
    font-size: 12px;
  }

  .preview-nav-auth__btn {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .hero-grid,
  .value-panel,
  .ai-layout,
  .translate-shell,
  .tool-hero-grid,
  .tool-form-grid {
    grid-template-columns: 1fr;
  }

  .translate-pane + .translate-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .translate-dual-row {
    grid-template-columns: 1fr;
  }

  .translate-cell + .translate-cell {
    border-left: 0;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
  }

  .card-grid,
  .tool-board,
  .price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .utility-menu__panel {
    width: min(280px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  .second-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .preview-nav-auth__btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .card-grid,
  .tool-board,
  .metric-row,
  .price-grid,
  .price-grid--single {
    grid-template-columns: 1fr;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }

  .utility-menu {
    width: 100%;
  }

  .utility-menu summary {
    width: 100%;
  }

  .utility-menu__panel {
    left: 0;
    right: auto;
    flex-direction: column;
  }

  .tool-result-grid,
  .tool-list-item,
  .rpa-download-panel,
  .client-download-panel {
    grid-template-columns: 1fr;
  }

  .translate-pane {
    min-height: 380px;
  }

  .translate-pane textarea,
  .translate-output {
    font-size: 17px;
    padding: 20px;
  }

  .translate-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .translate-select-pill {
    width: 100%;
  }
}

/* Premium visual pass */
:root {
  --bg: #fff8f0;
  --paper: rgba(255, 255, 255, 0.78);
  --paper-strong: rgba(255, 255, 255, 0.94);
  --ink: #111827;
  --muted: #64748b;
  --line: rgba(17, 24, 39, 0.09);
  --brand: #e11d8a;
  --brand-2: #ff6a1a;
  --gold: #f8c77e;
  --shadow: 0 34px 90px rgba(72, 45, 26, 0.14);
  --shadow-soft: 0 18px 54px rgba(17, 24, 39, 0.08);
  --radius: 32px;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(225, 29, 138, 0.18), transparent 32%),
    radial-gradient(circle at 82% 4%, rgba(255, 106, 26, 0.17), transparent 34%),
    radial-gradient(circle at 50% 48%, rgba(248, 199, 126, 0.14), transparent 42%),
    linear-gradient(180deg, #fff8f2 0%, #fffaf5 42%, #fff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 72%);
}

.preview-shell {
  width: min(1240px, calc(100% - 40px));
}

.preview-nav {
  background: rgba(255, 248, 242, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 14px 42px rgba(90, 59, 36, 0.06);
}

.preview-nav__inner {
  min-height: 78px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 17px;
  box-shadow: 0 16px 34px rgba(225, 29, 138, 0.3), inset 0 1px 0 rgba(255,255,255,0.35);
}

.brand {
  font-size: 16px;
}

.nav-links {
  gap: 2px;
  font-weight: 800;
}

.nav-links a {
  padding: 7px 8px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  transform: translateY(-1px);
}

.nav-links .is-active {
  background: linear-gradient(135deg, rgba(225, 29, 138, 0.13), rgba(255, 106, 26, 0.11));
}

/* 中等宽度顶栏：单行紧凑导航 */
@media (min-width: 901px) and (max-width: 1200px) {
  .brand {
    max-width: 128px;
    gap: 8px;
    font-size: 14px;
  }

  .brand > span:not(.brand-mark) {
    display: inline;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .nav-links {
    gap: 1px;
    font-size: 12px;
  }

  .nav-links a {
    padding: 6px 6px;
  }

  .preview-nav-auth__btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.hero {
  position: relative;
  padding: 92px 0 76px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: min(860px, 80vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(225, 29, 138, 0.24), rgba(255, 106, 26, 0.22), transparent);
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  gap: clamp(34px, 6vw, 72px);
}

.eyebrow {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(225, 29, 138, 0.14);
  box-shadow: 0 10px 28px rgba(225, 29, 138, 0.07);
  color: #b91c67;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 850px;
  margin: 22px 0 22px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.96;
}

.hero--compact {
  padding: 54px 0 26px;
}

.hero--compact::after {
  bottom: 0;
}

.hero--compact h1 {
  max-width: 760px;
  margin: 16px 0 16px;
  font-size: clamp(38px, 5.2vw, 68px);
}

.hero--compact .lead {
  max-width: 720px;
  font-size: clamp(16px, 1.45vw, 19px);
}

.section--tight {
  padding-top: 18px;
}

.preview-translate-page .hero--compact {
  padding: 8px 0 0;
}

.preview-translate-page .hero--compact::after {
  display: none;
}

.preview-translate-page .hero--compact h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(20px, 2.35vw, 30px);
  line-height: 1;
}

.preview-translate-page .hero--compact .lead {
  display: none;
}

.preview-translate-page .hero--compact .eyebrow {
  display: none;
}

.preview-translate-page .section--tight {
  padding-top: 0;
  padding-bottom: 0;
}

.hero h1 span,
.section-title span {
  color: transparent;
  background: linear-gradient(105deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.preview-home-page .hero h1 {
  max-width: 820px;
  font-size: clamp(48px, 5.45vw, 72px);
  line-height: 1.02;
}

.lead {
  max-width: 760px;
  color: #455166;
  font-size: clamp(18px, 1.8vw, 22px);
}

.hero-actions,
.section-actions,
.chat-actions {
  gap: 14px;
  margin-top: 30px;
}

.btn {
  min-height: 48px;
  padding: 0 21px;
  border-color: rgba(17, 24, 39, 0.08);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(17, 24, 39, 0.12);
}

.btn-primary,
.btn-green {
  box-shadow: 0 18px 42px rgba(225, 29, 138, 0.22);
}

.btn-primary:hover,
.btn-green:hover {
  filter: saturate(1.08) brightness(1.02);
}

.btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.btn-green,
.tg-support-btn {
  color: #fff;
  border-color: rgba(20, 184, 166, 0.32);
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.22);
}

.tg-support-btn {
  font-weight: 900;
  letter-spacing: 0.01em;
}

.hero-card,
.side-panel,
.chat-panel,
.form-card,
.value-panel {
  border: 1px solid rgba(255,255,255,0.78);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.68)),
    radial-gradient(circle at 0% 0%, rgba(225, 29, 138, 0.08), transparent 32%);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  border-radius: 40px;
}

.bubble {
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.1);
}

.bubble.user,
.message.user .bubble {
  background: linear-gradient(135deg, #e11d8a 0%, #ff6a1a 100%);
}

.metric {
  padding: 18px;
  border-color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.72);
}

.metric strong {
  font-size: 22px;
}

.section {
  padding: 68px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-title {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.04;
}

.section-sub {
  max-width: 850px;
  font-size: 17px;
}

.card,
.tool-card,
.price-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.78);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card::before,
.tool-card::before,
.price-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--gold));
  opacity: 0;
  transition: opacity 0.22s ease;
}

a.card:hover,
.tool-card:hover,
.price-card:hover {
  transform: translateY(-4px);
  border-color: rgba(225, 29, 138, 0.18);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.12);
}

a.card:hover::before,
.tool-card:hover::before,
.price-card:hover::before {
  opacity: 1;
}

.card {
  min-height: 210px;
  padding: 28px;
}

.card h3,
.tool-card strong {
  font-size: 22px;
}

.tag,
.tool-pill {
  color: #9d174d;
  background: linear-gradient(135deg, rgba(225, 29, 138, 0.11), rgba(255, 106, 26, 0.09));
}

.value-panel {
  padding: clamp(26px, 4vw, 46px);
  border-radius: 42px;
}

.compare {
  border-color: rgba(255,255,255,0.8);
  box-shadow: var(--shadow-soft);
}

.compare-head > div {
  background: linear-gradient(135deg, #fff7ed, #fff1f7);
}

.tool-board {
  gap: 16px;
}

.tool-card {
  min-height: 146px;
  padding: 23px;
  border-radius: 26px;
}

.ai-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0 72px;
}

.preview-ai-page .ai-layout {
  padding-top: 32px;
}

.side-panel {
  position: sticky;
  top: 104px;
  padding: 20px;
  border-radius: 34px;
}

.mode-card {
  min-height: 88px;
  padding: 20px;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.mode-card.active {
  border-color: rgba(225, 29, 138, 0.22);
  background: linear-gradient(135deg, #fff1f7, #fff7ed);
}

.chat-panel {
  border-radius: 36px;
}

.chat-head {
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(255,247,237,0.9), rgba(255,241,247,0.9));
}

.chat-window {
  min-height: 560px;
  padding: 30px;
}

.preview-ai-page .chat-window {
  min-height: 0;
}

.composer {
  padding: 20px;
}

.composer textarea,
.form-card input,
.form-card textarea,
.form-card select {
  border-color: rgba(17, 24, 39, 0.08);
  background: rgba(255,255,255,0.84);
}

.form-card {
  padding: 26px;
  border-radius: 34px;
}

.result-box {
  padding: 18px;
  border-color: rgba(17, 24, 39, 0.08);
  background: linear-gradient(135deg, #f8fafc, #fff7ed);
}

.result-box[data-mode="ok"] {
  border-color: rgba(20, 184, 166, 0.22);
  background: linear-gradient(135deg, #f0fdfa, #fff);
  color: #0f766e;
}

.result-box[data-mode="error"] {
  border-color: rgba(225, 29, 72, 0.2);
  background: linear-gradient(135deg, #fff1f2, #fff);
  color: #be123c;
}

#member-result-status {
  margin-top: 8px;
  line-height: 1.7;
}

.member-checkout-hint {
  display: block;
  margin-top: 6px;
  color: #9d174d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

#member-total-checkout {
  color: #c2410c;
}

.member-account-state {
  padding: 13px 15px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  color: var(--muted);
  font-weight: 800;
  line-height: 1.6;
}

.member-account-state[data-mode="ok"] {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.2);
  background: rgba(240, 253, 250, 0.86);
}

.member-account-state[data-mode="error"] {
  color: #be123c;
  border-color: rgba(225, 29, 72, 0.18);
  background: rgba(255, 241, 242, 0.8);
}

.member-trial-state {
  padding: 13px 15px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 18px;
  color: #0f766e;
  background: rgba(240,253,250,0.88);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.7;
}

.member-trial-state[hidden] {
  display: none !important;
}

.member-trial-state strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

.member-trial-state[data-mode="member"] {
  color: #7c2d12;
  border-color: rgba(251, 146, 60, 0.24);
  background: rgba(255, 247, 237, 0.9);
}

.member-trial-state[data-mode="error"] {
  color: #be123c;
  border-color: rgba(225, 29, 72, 0.18);
  background: rgba(255, 241, 242, 0.84);
}

.member-redeem-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(124, 58, 237, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(250, 245, 255, 0.92), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.14), transparent 34%);
}

.member-redeem-card strong {
  display: block;
  color: #4c1d95;
  font-size: 15px;
  font-weight: 900;
}

.member-redeem-card span {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.member-redeem-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.member-redeem-row input {
  min-height: 46px;
  border: 1px solid rgba(76, 29, 149, 0.12);
  border-radius: 16px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: none;
}

.member-redeem-row input:focus {
  border-color: rgba(124, 58, 237, 0.34);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.member-redeem-row .btn {
  min-height: 46px;
  padding-inline: 18px;
}

.member-redeem-card p {
  min-height: 18px;
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

.member-redeem-card p[data-mode="ok"] {
  color: #0f766e;
}

.member-redeem-card p[data-mode="error"] {
  color: #be123c;
}

.member-payment-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,253,250,0.82)),
    radial-gradient(circle at 100% 0%, rgba(20,184,166,0.12), transparent 32%);
  box-shadow: 0 22px 55px rgba(15, 118, 110, 0.1);
}

.member-payment-card[hidden] {
  display: none !important;
}

.member-payment-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
}

.member-payment-row span,
.member-pay-address,
.member-tx-box {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-payment-row strong {
  color: var(--ink);
  word-break: break-all;
}

.member-pay-address,
.member-tx-box {
  display: grid;
  gap: 8px;
}

.member-pay-address textarea {
  min-height: 78px;
  resize: none;
  word-break: break-all;
}

.member-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-payment-actions .btn {
  flex: 1 1 150px;
}

.member-payment-note {
  border-radius: 16px;
  padding: 12px 14px;
  color: #0f766e;
  background: rgba(240,253,250,0.9);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.member-payment-row--amount {
  background: linear-gradient(135deg, rgba(254,243,199,0.95), rgba(254,249,235,0.92));
  border: 1px solid rgba(245,158,11,0.45);
  align-items: center;
}

.member-payment-row--amount strong {
  font-size: 20px;
  font-weight: 900;
  color: #b45309;
  letter-spacing: 0.2px;
}

.member-amount-warning {
  border-radius: 16px;
  padding: 12px 14px;
  color: #9a3412;
  background: rgba(255,237,213,0.92);
  border: 1px solid rgba(234,88,12,0.4);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.member-amount-warning strong {
  color: #b91c1c;
  font-weight: 900;
}

.btn-amount-copy {
  border-color: rgba(234,88,12,0.55);
  color: #b45309;
  font-weight: 900;
}

.process-list {
  gap: 14px;
}

.process-list li {
  padding: 18px;
  border-color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.74);
}

.price-grid {
  gap: 18px;
}

.price-card {
  padding: 28px;
  border-radius: 30px;
}

.price-card.is-featured {
  transform: translateY(-8px);
  border-color: rgba(225, 29, 138, 0.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,241,247,0.92)),
    radial-gradient(circle at 100% 0%, rgba(255,106,26,0.14), transparent 36%);
}

.price {
  font-size: 44px;
}

.check-list {
  font-size: 15px;
}

.cta-band {
  margin: 38px auto 0;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(17,24,39,0.94), rgba(77,35,74,0.92)),
    radial-gradient(circle at 85% 0%, rgba(255,106,26,0.28), transparent 34%);
  color: #fff;
  box-shadow: 0 34px 90px rgba(17, 24, 39, 0.22);
}

.cta-band .section-title,
.cta-band .section-sub {
  color: #fff;
}

.cta-band .section-sub {
  opacity: 0.82;
}

.cta-band .btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

.cta-band .btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.footer {
  padding: 44px 0 68px;
}

.translate-workbench {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,247,241,0.72)),
    radial-gradient(circle at 15% 0%, rgba(255,95,133,0.15), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(27,194,214,0.16), transparent 32%);
  box-shadow: 0 34px 92px rgba(143, 82, 74, 0.16);
  container-type: inline-size;
  container-name: translate-workbench;
}

.translate-workbench__bar,
.translate-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.translate-workbench select {
  height: 42px;
  min-width: 150px;
  border: 1px solid rgba(219, 39, 119, 0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
}

.translate-swap {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.translate-dual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

@supports (grid-template-rows: subgrid) {
  .translate-dual {
    align-items: start;
    grid-template-rows: none;
  }

  .translate-dual .translate-pane {
    display: flex;
    flex-direction: column;
    grid-row: auto;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
  }
}

@supports not (grid-template-rows: subgrid) {
  .translate-dual .translate-pane__head {
    min-height: 76px;
    box-sizing: border-box;
  }
}

.translate-dual--reverse {
  margin-top: 16px;
}

.translate-pane {
  position: relative;
  height: 360px;
  min-height: 360px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  background: rgba(255,255,255,0.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 18px 52px rgba(143,82,74,0.08);
  overflow: hidden;
}

.translate-pane.is-picker-host {
  z-index: 4;
  overflow: visible;
}

.translate-pane__tools button.is-picker-open {
  border-color: rgba(20, 184, 166, 0.45);
  color: #0f766e;
  background: #ecfdf5;
}

.translate-pane__head {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  height: auto;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(226, 173, 157, 0.32);
  color: var(--ink);
  font-weight: 900;
}

.translate-pane__head > span {
  white-space: nowrap;
  min-width: 0;
}

/* 原文区按钮较多：标签独占一行，工具栏换行，避免窄宽时竖排叠字 */
.translate-pane__head:has(.translate-pane__tools) > span {
  flex: 1 1 100%;
}

.translate-pane__head:has(.translate-pane__tools) .translate-pane__tools {
  flex: 1 1 100%;
  justify-content: flex-start;
}

.translate-pane__head button {
  min-height: 30px;
  border: 1px solid rgba(225, 29, 138, 0.16);
  border-radius: 999px;
  padding: 5px 11px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,241,247,0.9));
  color: #c2186a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(225, 29, 138, 0.08), inset 0 1px 0 rgba(255,255,255,0.92);
  transition: transform .1s ease, box-shadow .1s ease, background .16s ease, border-color .16s ease;
  user-select: none;
}

.translate-pane__head button:hover {
  border-color: rgba(225, 29, 138, 0.32);
  background: linear-gradient(180deg, #fff, #ffe8f2);
  box-shadow: 0 12px 24px rgba(225, 29, 138, 0.12), inset 0 1px 0 rgba(255,255,255,0.95);
}

.translate-pane__head button:active {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 3px 8px rgba(225, 29, 138, 0.12), inset 0 2px 5px rgba(157, 23, 77, 0.12);
}

.translate-pane__head button:disabled {
  cursor: wait;
  opacity: .62;
  transform: none;
}

.translate-pane__tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.translate-pane__tools button {
  white-space: nowrap;
}

.translate-run-mini {
  border-color: rgba(20, 184, 166, 0.42) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #14b8a6, #22d3ee) !important;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.18), inset 0 1px 0 rgba(255,255,255,0.34) !important;
}

.translate-run-mini:hover {
  background: linear-gradient(135deg, #0fbaa7, #06b6d4) !important;
  box-shadow: 0 15px 30px rgba(20, 184, 166, 0.24), inset 0 1px 0 rgba(255,255,255,0.36) !important;
}

.translate-picker {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: min(320px, 70vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(219, 39, 119, 0.16);
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 20px 55px rgba(143, 82, 74, 0.18);
}

.translate-picker--floating {
  position: fixed;
  right: auto;
  z-index: 10050;
}

.translate-picker--anchored {
  position: absolute;
  top: 46px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: auto;
  max-height: none;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.translate-picker--anchored.translate-picker--phrase {
  display: block;
  overflow: auto;
  padding: 14px;
}

.translate-picker:not(.translate-picker--emoji) button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(236,72,153,0.1);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed, #fff1f7);
  color: #33272a;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.translate-picker:not(.translate-picker--emoji) button:hover {
  border-color: rgba(236,72,153,0.28);
  background: #fff;
}

.translate-picker--floating.translate-picker--emoji.translate-picker--mac {
  position: fixed;
  right: auto;
  z-index: 10050;
  width: 380px;
  height: 318px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.04),
    0 16px 48px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(15, 23, 42, 0.08);
  animation: translate-emoji-pop 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  transform-origin: top left;
}

.translate-picker--inline.translate-picker--emoji {
  display: none;
}

.translate-emoji-mac__header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto 1fr minmax(96px, 132px);
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px;
}

.translate-emoji-mac__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(142, 142, 147, 0.16);
  color: #636366;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.translate-emoji-mac__close:hover {
  background: rgba(142, 142, 147, 0.24);
}

.translate-emoji-mac__types {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.translate-emoji-mac__type-tab {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8e8e93;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.translate-emoji-mac__type-tab:hover {
  color: #636366;
}

.translate-emoji-mac__type-tab.is-active {
  background: #007aff;
  color: #fff;
}

.translate-emoji-mac__search {
  position: relative;
  display: block;
  min-width: 0;
}

.translate-emoji-mac__search::after {
  content: "⌕";
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-52%);
  color: #aeaeb2;
  font-size: 14px;
  pointer-events: none;
}

.translate-emoji-mac__search input {
  width: 100%;
  height: 30px;
  padding: 0 28px 0 12px;
  border: 1px solid #d1d1d6;
  border-radius: 999px;
  background: #fff;
  color: #1c1c1e;
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.translate-emoji-mac__search input:focus {
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14);
}

.translate-emoji-mac__divider {
  flex: 0 0 auto;
  height: 1px;
  margin: 0 10px;
  background: repeating-linear-gradient(
    90deg,
    #d1d1d6 0,
    #d1d1d6 4px,
    transparent 4px,
    transparent 8px
  );
}

.translate-emoji-mac__footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 8px 8px;
}

.translate-emoji-mac__categories {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.translate-emoji-mac__categories::-webkit-scrollbar {
  display: none;
}

.translate-emoji-mac__category {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8e8e93;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.translate-emoji-mac__category:hover {
  color: #636366;
  background: rgba(142, 142, 147, 0.08);
}

.translate-emoji-mac__category.is-active {
  color: #007aff;
  background: transparent;
}

.translate-emoji-mac__more {
  flex: 0 0 auto;
  width: 18px;
  color: #c7c7cc;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.translate-emoji-mac__empty {
  margin: 0;
  padding: 28px 12px;
  color: #8e8e93;
  font-size: 13px;
  text-align: center;
}

.translate-picker--mac .translate-emoji-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 6px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #d1d1d6 transparent;
}

.translate-picker--mac .translate-emoji-body::-webkit-scrollbar {
  width: 8px;
}

.translate-picker--mac .translate-emoji-body::-webkit-scrollbar-thumb {
  background: #d1d1d6;
  border-radius: 999px;
  border: 2px solid #fff;
}

.translate-picker--mac .translate-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
}

.translate-picker--mac .translate-emoji-cell,
.translate-picker--mac .translate-emoji-grid button {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.translate-picker--mac .translate-emoji-cell:hover,
.translate-picker--mac .translate-emoji-grid button:hover {
  background: #e5e5ea;
}

.translate-picker--mac .translate-emoji-cell:active,
.translate-picker--mac .translate-emoji-grid button:active {
  background: #d1d1d6;
  transform: scale(0.94);
}

.translate-emoji-mac__text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.translate-emoji-mac__text-cell {
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1c1c1e;
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.translate-emoji-mac__text-cell:hover {
  background: #e5e5ea;
}

.translate-emoji-mac__text-cell:active {
  background: #d1d1d6;
}

.translate-picker--emoji {
  width: 352px;
  max-height: min(320px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow:
    0 0 0 0.5px rgba(15, 23, 42, 0.06),
    0 10px 36px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06);
  animation: translate-emoji-pop 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  transform-origin: top left;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .translate-picker--emoji {
    background: #fff;
  }
}

@keyframes translate-emoji-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.translate-picker--emoji button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 400;
  text-align: center;
}

.translate-emoji-head {
  display: none;
}

.translate-emoji-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 8px 10px 10px;
  border-top: 0.5px solid rgba(15, 23, 42, 0.08);
  border-bottom: none;
  background: rgba(248, 248, 250, 0.72);
  scrollbar-width: none;
  justify-content: space-around;
}

.translate-picker--inline.translate-picker--emoji .translate-emoji-tabs {
  border-top: 0;
  border-bottom: 0.5px solid rgba(15, 23, 42, 0.06);
  justify-content: flex-start;
}

.translate-emoji-tabs::-webkit-scrollbar {
  display: none;
}

.translate-emoji-tab,
.translate-emoji-tabs button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.translate-emoji-tab:hover,
.translate-emoji-tabs button:hover {
  background: rgba(15, 23, 42, 0.05);
}

.translate-emoji-tab.is-active,
.translate-emoji-tabs button.is-active {
  background: rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.translate-emoji-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 6px 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.translate-emoji-body::-webkit-scrollbar {
  display: none;
}

.translate-emoji-section {
  display: none;
}

.translate-emoji-section.is-active {
  display: block;
}

.translate-emoji-title {
  display: none;
}

.translate-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.translate-emoji-cell,
.translate-picker--emoji .translate-emoji-grid button {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.translate-emoji-cell:hover,
.translate-picker--emoji .translate-emoji-grid button:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: transparent;
  transform: none;
}

.translate-emoji-cell:active,
.translate-picker--emoji .translate-emoji-grid button:active {
  background: rgba(15, 23, 42, 0.1);
  transform: scale(0.92);
}

.translate-picker--emoji button {
  font-weight: 400;
  text-align: center;
}

@media (max-width: 720px) {
  .translate-picker--floating.translate-picker--emoji.translate-picker--mac {
    width: min(340px, calc(100vw - 24px));
    height: min(300px, calc(100vh - 80px));
  }

  .translate-emoji-mac__header {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "close types"
      "search search";
  }

  .translate-emoji-mac__close {
    grid-area: close;
  }

  .translate-emoji-mac__types {
    grid-area: types;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .translate-emoji-mac__types::-webkit-scrollbar {
    display: none;
  }

  .translate-emoji-mac__search {
    grid-area: search;
  }

  .translate-picker--mac .translate-emoji-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.translate-picker--phrase {
  width: 540px;
  height: 500px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.04),
    0 16px 48px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(15, 23, 42, 0.08);
}

.translate-picker--phrase .translate-phrase-add {
  flex: 0 0 auto;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.translate-picker--phrase .translate-phrase-add textarea {
  min-height: 48px;
  max-height: 64px;
}

.translate-picker--phrase .translate-phrase-add button {
  min-height: 48px;
}

.translate-phrase-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.translate-picker--phrase .translate-phrase-section--preset {
  flex: 0 0 auto;
  min-height: 0;
  max-height: 34%;
}

.translate-picker--phrase .translate-phrase-section--custom {
  flex: 1 1 auto;
  min-height: 0;
}

.translate-picker--phrase .translate-phrase-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.translate-picker--phrase .translate-phrase-section--preset .translate-phrase-list {
  max-height: 120px;
  flex: 0 1 auto;
}

.translate-picker--phrase .translate-phrase-section--custom .translate-phrase-list {
  flex: 1 1 auto;
  min-height: 0;
}

.translate-picker--phrase .translate-phrase-list {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d1d6 transparent;
}

.translate-picker--phrase .translate-phrase-foot {
  flex: 0 0 auto;
  margin-top: 10px;
  margin-bottom: 0;
  padding-top: 8px;
}

.translate-phrase-section + .translate-phrase-section {
  margin-top: 0;
}

.translate-phrase-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(219,39,119,0.1);
}

.translate-phrase-add textarea {
  min-height: 72px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid rgba(236,72,153,0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.9);
  color: #33272a;
  font: inherit;
  outline: none;
}

.translate-phrase-add button {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.translate-phrase-section + .translate-phrase-section {
  margin-top: 0;
}

.translate-phrase-title {
  margin-bottom: 8px;
  color: #7c2d5f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.translate-phrase-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.translate-phrase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(236, 72, 153, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.translate-phrase-row:not(:has(.translate-phrase-actions)) {
  grid-template-columns: minmax(0, 1fr);
}

.translate-phrase-insert {
  min-height: 0;
  padding: 6px 8px;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
  font-size: 13px;
  font-weight: 600;
}

.translate-phrase-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.translate-picker--phrase .translate-phrase-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8e8e93;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.translate-picker--phrase .translate-phrase-icon svg {
  width: 16px;
  height: 16px;
}

.translate-picker--phrase .translate-phrase-icon:hover {
  background: rgba(142, 142, 147, 0.12);
  color: #636366;
}

.translate-picker--phrase .translate-phrase-icon--edit:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
}

.translate-picker--phrase .translate-phrase-icon--delete:hover {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
}

.translate-phrase-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.translate-phrase-foot {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.translate-pane textarea,
.translate-output {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #33272a;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.74;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.translate-output {
  white-space: pre-wrap;
}

.translate-actions {
  margin: 0;
  min-height: 0;
}

.translate-actions--reverse {
  margin-bottom: 0;
}

#translate-status {
  color: var(--muted);
  font-size: 14px;
}

#translate-status[data-mode="ok"] {
  color: #059669;
}

#translate-status[data-mode="error"] {
  color: #dc2626;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 58px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .price-card.is-featured {
    transform: none;
  }

  .translate-dual {
    grid-template-columns: 1fr;
  }
}

/* 侧栏 + 主内容区变窄时，按工作台实际宽度单列排版（不只看 viewport） */
@container translate-workbench (max-width: 720px) {
  .translate-dual {
    grid-template-columns: 1fr;
  }

  .translate-pane {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
  }
}

@container translate-workbench (max-width: 520px) {
  .translate-pane__tools button,
  .translate-pane__head button {
    padding: 4px 9px;
    font-size: 12px;
  }

  .translate-workbench__bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 10px;
    padding-right: 0;
  }

  .poe-translate-inner .translate-history-btn {
    position: static;
    transform: none;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .preview-shell {
    width: min(100% - 28px, 1240px);
  }

  .hero {
    padding: 44px 0 54px;
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .section {
    padding: 48px 0;
  }

  .translate-workbench__bar,
  .translate-actions {
    flex-wrap: wrap;
  }

  .translate-workbench select {
    min-width: 128px;
  }
}

/* Final AI chat sizing override: keep the shell fixed and scroll only messages. */
.preview-ai-page .ai-layout {
  height: calc(100vh - 70px);
  min-height: 760px;
  overflow: hidden;
}

.preview-ai-page .chat-panel {
  height: calc(100vh - 118px);
  min-height: 720px;
  max-height: calc(100vh - 118px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-ai-page .chat-head,
.preview-ai-page .composer {
  flex: 0 0 auto;
}

.preview-ai-page .chat-window {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.preview-ai-page .message .message-body {
  max-width: min(760px, 84%);
}

.preview-ai-page .message .bubble {
  max-width: 100%;
  line-height: 1.95;
}

.preview-ai-page .message.ai .message-body {
  max-width: min(720px, 84%);
}

.preview-ai-page .message.user .message-body {
  max-width: min(680px, 80%);
}

.preview-ai-page .message.ai .message-body {
  max-width: min(780px, 92%);
}

.preview-ai-page .message.ai .bubble.ai-rich {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  white-space: normal;
  font-size: 15px;
  line-height: 1.82;
  letter-spacing: 0;
}

.preview-ai-page .ai-rich p,
.preview-ai-page .ai-rich ul,
.preview-ai-page .ai-rich ol {
  margin: 0;
}

.preview-ai-page .ai-paragraph {
  color: #243044;
  overflow-wrap: anywhere;
}

.preview-ai-page .ai-heading {
  margin-top: 2px;
  color: #111827;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.45;
}

.preview-ai-page .ai-script-heading {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #9d174d;
  background: linear-gradient(135deg, rgba(255, 241, 247, 0.95), rgba(240, 253, 250, 0.9));
  box-shadow: inset 0 0 0 1px rgba(225, 29, 138, 0.11);
}

.preview-ai-page .ai-script-heading::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d8a, #14b8a6);
}

.preview-ai-page .ai-callout,
.preview-ai-page .ai-quote-block {
  border: 1px solid rgba(225, 29, 138, 0.12);
  border-left: 4px solid rgba(225, 29, 138, 0.5);
  border-radius: 18px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 241, 247, 0.72), rgba(255, 247, 237, 0.62)),
    rgba(255, 255, 255, 0.86);
  color: #3b1f35;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.preview-ai-page .ai-quote-block {
  border-color: rgba(20, 184, 166, 0.16);
  border-left-color: rgba(20, 184, 166, 0.58);
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.7), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.9);
  color: #164e63;
}

.preview-ai-page .ai-paragraph-group {
  display: grid;
  gap: 10px;
}

.preview-ai-page .ai-list {
  display: grid;
  gap: 9px;
  padding-left: 1.25em;
  color: #243044;
}

.preview-ai-page .ai-list li::marker {
  color: #e11d8a;
  font-weight: 900;
}

.preview-ai-page .ai-list-line {
  position: relative;
  padding-left: 18px;
  color: #243044;
}

.preview-ai-page .ai-list-line::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d8a, #14b8a6);
}

.preview-ai-page .ai-paragraph:has(.ai-inline-quote) + .ai-paragraph,
.preview-ai-page .ai-paragraph-group .ai-paragraph:has(+ .ai-heading) {
  margin-bottom: 2px;
}

.preview-ai-page .ai-paragraph:first-letter {
  letter-spacing: 0;
}

.preview-ai-page .ai-inline-quote {
  color: #7c2d12;
  font-weight: 850;
}

.preview-ai-page .ai-thinking {
  color: #64748b;
  font-weight: 750;
}

/* Tutorial Center */
.preview-tutorial-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(236, 72, 153, 0.16), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(20, 184, 166, 0.16), transparent 30%),
    linear-gradient(180deg, #fff7fb 0%, #f5efff 46%, #ffffff 100%);
}

.tutorial-hero {
  padding: 44px 0 22px;
}

.tutorial-hero h1 {
  max-width: 840px;
  margin: 16px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.tutorial-hero p {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
}

.tutorial-hub-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 46px;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tutorial-article-shell {
  grid-template-columns: minmax(210px, 280px) minmax(0, 860px);
}

.tutorial-hub-sidebar,
.tutorial-article-list,
.tutorial-article {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.1), transparent 34%);
  box-shadow: 0 28px 70px rgba(88, 28, 135, 0.1);
  backdrop-filter: blur(18px);
}

.tutorial-hub-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  border-radius: 28px;
  padding: 16px 0;
}

.tutorial-hub-cat-title {
  margin: 0 0 10px;
  padding: 0 18px;
  color: #4c1d95;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.tutorial-cat-list,
.tutorial-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tutorial-cat-list li a,
.tutorial-cat-list button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 0;
  color: #475569;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.tutorial-cat-list li a:hover,
.tutorial-cat-list button:hover,
.tutorial-cat-list button.active {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
}

.tutorial-cat-list button.active {
  font-weight: 950;
}

.tutorial-cat-list .cnt {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.tutorial-hub-main {
  min-width: 0;
}

.tutorial-article-list {
  border-radius: 32px;
  overflow: hidden;
}

.tutorial-article-list li {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  transition: background 0.18s ease, transform 0.18s ease;
}

.tutorial-article-list li:last-child {
  border-bottom: 0;
}

.tutorial-article-list li:hover {
  background: rgba(255, 255, 255, 0.62);
}

.tutorial-article-list li.hidden {
  display: none;
}

.tutorial-article-list .tut-thumb {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 18px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(20, 184, 166, 0.12));
}

.tutorial-article-list .tut-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tutorial-article-list .tut-info a,
.tutorial-article-list .tut-title--guest {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutorial-article-list .tut-info a:hover {
  color: #db2777;
}

.tutorial-article-list .meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.tutorial-article-list .tutorial-list-hint {
  align-items: flex-start;
  color: #4c1d95;
  background: linear-gradient(135deg, rgba(250, 245, 255, 0.95), rgba(255, 255, 255, 0.78));
  font-size: 14px;
  font-weight: 850;
  line-height: 1.7;
}

.tutorial-article-list .tutorial-list-hint a {
  color: #db2777;
  font-weight: 950;
}

.tutorial-article {
  border-radius: 34px;
  padding: clamp(24px, 4vw, 44px);
  color: #1f2937;
  min-width: 0;
  overflow: hidden;
}

.tutorial-article img {
  max-width: 100%;
  height: auto;
  border-radius: 22px;
  vertical-align: middle;
}

.tutorial-article figure {
  margin: 1.2rem 0;
}

.tutorial-article figcaption {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.tutorial-article-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
}

.tutorial-article-h1 {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.tutorial-article-lead {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.7;
}

.tutorial-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 900;
}

.tutorial-content h2,
.tutorial-article-h2 {
  margin: 34px 0 14px;
  padding-left: 14px;
  border-left: 4px solid #ec4899;
  color: #111827;
  font-size: 22px;
  line-height: 1.35;
}

.tutorial-content p,
.tutorial-p {
  max-width: 100%;
  color: #334155;
  font-size: 15px;
  line-height: 1.86;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tutorial-content ul,
.tutorial-ul {
  padding-left: 1.2em;
  color: #334155;
  line-height: 1.8;
}

.tutorial-content blockquote,
.tutorial-blockquote,
.tutorial-read-locked {
  max-width: 100%;
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-left: 4px solid rgba(236, 72, 153, 0.74);
  border-radius: 22px;
  background: rgba(250, 245, 255, 0.75);
  color: #4c1d95;
  font-weight: 800;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tutorial-content pre,
.tutorial-article pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 22px;
  padding: 16px 18px;
  background: rgba(250, 245, 255, 0.75);
  color: #4c1d95;
  font-size: 13px;
  line-height: 1.75;
}

.tutorial-content code {
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.tutorial-content blockquote *,
.tutorial-blockquote *,
.tutorial-article pre *,
.tutorial-content pre * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tutorial-content,
.tutorial-content *,
.tutorial-article,
.tutorial-article * {
  min-width: 0;
}

.tutorial-content > *,
.tutorial-content div,
.tutorial-content span,
.tutorial-content p,
.tutorial-content li,
.tutorial-content td,
.tutorial-content th {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.tutorial-content pre,
.tutorial-content code,
.tutorial-content textarea,
.tutorial-content .code,
.tutorial-content [style*="white-space"],
.tutorial-content [style*="monospace"] {
  max-width: 100% !important;
  white-space: pre-wrap !important;
  overflow-x: auto !important;
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
}

.tutorial-img-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(124, 58, 237, 0.28);
  border-radius: 24px;
  color: #7c3aed;
  background: rgba(250, 245, 255, 0.72);
  font-weight: 900;
}

.tutorial-faq dt {
  margin: 16px 0 6px;
  color: #111827;
  font-weight: 950;
}

.tutorial-faq dd {
  margin: 0 0 8px;
  color: #64748b;
  line-height: 1.75;
}

.tutorial-article-nav {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
}

.tutorial-back-btn,
.tutorial-read-locked__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #f97316);
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.22);
}

.tutorial-read-locked__title {
  margin: 0 0 6px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.tutorial-read-locked__desc {
  margin: 0 0 12px;
  color: #64748b;
}

.tutorial-footer {
  text-align: center;
}

.tutorial-footer .links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 850;
}

@media (max-width: 860px) {
  .tutorial-hub-shell,
  .tutorial-article-shell {
    grid-template-columns: 1fr;
  }

  .tutorial-hub-sidebar {
    position: static;
    max-height: none;
  }

  .tutorial-hero {
    padding-top: 28px;
  }

  .tutorial-article-list .tut-info a,
  .tutorial-article-list .tut-title--guest {
    white-space: normal;
  }
}

/* 内测站教程中心：统一卡片布局，减少上下分区割裂感 */
html.staging-tutorial-hub .preview-tutorial-page {
  background: linear-gradient(180deg, #fff8fb 0%, #f8f4ff 38%, #ffffff 100%);
}

html.staging-tutorial-hub .tutorial-hub-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

html.staging-tutorial-hub .tutorial-hub-layout--article {
  padding-top: 16px;
}

html.staging-tutorial-hub .tutorial-hero {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 22px 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 24px 24px 0 0;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.08), transparent 40%);
  box-shadow: 0 18px 48px rgba(88, 28, 135, 0.08);
}

html.staging-tutorial-hub .tutorial-hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
}

html.staging-tutorial-hub .tutorial-hero h1 {
  max-width: none;
  margin: 10px 0 8px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

html.staging-tutorial-hub .tutorial-hero p {
  max-width: none;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}

html.staging-tutorial-hub .tutorial-hub-shell {
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.06), transparent 42%);
  box-shadow: 0 28px 70px rgba(88, 28, 135, 0.1);
}

html.staging-tutorial-hub .tutorial-hub-layout--article .tutorial-hub-shell {
  border-top: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
}

html.staging-tutorial-hub .tutorial-hub-sidebar,
html.staging-tutorial-hub .tutorial-article-list,
html.staging-tutorial-hub .tutorial-article {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

html.staging-tutorial-hub .tutorial-hub-sidebar {
  top: 0;
  max-height: none;
  align-self: stretch;
  padding: 12px 0 16px;
  border-right: 1px solid rgba(124, 58, 237, 0.1);
}

html.staging-tutorial-hub .tutorial-hub-cat-title {
  padding: 0 16px;
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0.02em;
}

html.staging-tutorial-hub .tutorial-cat-list li a,
html.staging-tutorial-hub .tutorial-cat-list button {
  padding: 10px 16px;
  font-size: 13px;
}

html.staging-tutorial-hub .tutorial-article-list {
  border-radius: 0;
}

html.staging-tutorial-hub .tutorial-article-list li {
  min-height: 72px;
  padding: 14px 20px;
}

html.staging-tutorial-hub .tutorial-article-list .tutorial-list-hint {
  margin: 0;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  background: rgba(250, 245, 255, 0.55);
}

html.staging-tutorial-hub .tutorial-article {
  padding: clamp(20px, 3vw, 36px);
}

html.staging-tutorial-hub .tutorial-footer {
  padding-top: 8px;
  opacity: 0.72;
  font-size: 13px;
}

html.staging-tutorial-hub.preview-embed-mode .preview-tutorial-page {
  min-height: 100%;
  background: transparent;
}

html.staging-tutorial-hub.preview-embed-mode .tutorial-hero,
html.staging-tutorial-hub.preview-embed-mode .tutorial-footer {
  display: none;
}

html.staging-tutorial-hub.preview-embed-mode .tutorial-hub-layout,
html.staging-tutorial-hub.preview-embed-mode .tutorial-hub-layout--article {
  width: 100%;
  padding: 0;
}

html.staging-tutorial-hub.preview-embed-mode .tutorial-hub-shell {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

html.staging-tutorial-hub.preview-embed-mode .tutorial-hub-sidebar {
  top: 0;
  max-height: none;
  border-right-color: rgba(124, 58, 237, 0.08);
}

html.staging-tutorial-hub.preview-embed-mode .tutorial-hub-layout--article .tutorial-hub-shell {
  border: 0;
  border-radius: 0;
}

.poe-app .poe-embed-tutorial-staging .poe-embed-frame {
  width: min(920px, calc(100% - var(--poe-content-gutter, 16px) * 2));
  max-width: min(920px, calc(100% - var(--poe-content-gutter, 16px) * 2));
}

@media (max-width: 860px) {
  html.staging-tutorial-hub .tutorial-hub-layout {
    width: calc(100% - 20px);
    padding: 12px 0 24px;
  }

  html.staging-tutorial-hub .tutorial-hero {
    padding: 16px 16px 14px;
    border-radius: 20px 20px 0 0;
  }

  html.staging-tutorial-hub .tutorial-hub-shell {
    border-radius: 0 0 20px 20px;
    grid-template-columns: 1fr;
  }

  html.staging-tutorial-hub .tutorial-hub-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    padding-bottom: 8px;
  }

  html.staging-tutorial-hub .tutorial-hub-layout--article .tutorial-hub-shell {
    border-radius: 20px;
  }
}

/* 内测站教程中心 · 夜间模式可读性（仅 staging-tutorial-hub + theme-night） */
html.theme-night.staging-tutorial-hub {
  color-scheme: dark;
}

html.theme-night.staging-tutorial-hub .preview-tutorial-page {
  color: var(--ink, #e8edf3);
  background:
    radial-gradient(circle at 18% 8%, rgba(236, 72, 153, 0.1), transparent 30%),
    radial-gradient(circle at 84% 0%, rgba(20, 184, 166, 0.08), transparent 32%),
    linear-gradient(180deg, #151923 0%, var(--night-bg-base, #12161f) 52%, var(--night-bg-deep, #0d1016) 100%);
}

html.theme-night.staging-tutorial-hub .tutorial-hero {
  border-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(155deg, rgba(30, 36, 48, 0.98), rgba(24, 29, 40, 0.94)),
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.12), transparent 42%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html.theme-night.staging-tutorial-hub .tutorial-hero .eyebrow {
  color: #f9a8d4;
}

html.theme-night.staging-tutorial-hub .tutorial-hero h1 {
  color: #f1f5f9;
}

html.theme-night.staging-tutorial-hub .tutorial-hero p {
  color: #94a3b8;
}

html.theme-night.staging-tutorial-hub .tutorial-hub-shell {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(155deg, rgba(28, 34, 46, 0.98), rgba(22, 27, 38, 0.96)),
    radial-gradient(circle at 0% 100%, rgba(20, 184, 166, 0.08), transparent 44%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

html.theme-night.staging-tutorial-hub .tutorial-hub-layout--article .tutorial-hub-shell {
  border-color: rgba(255, 255, 255, 0.1);
}

html.theme-night.staging-tutorial-hub .tutorial-hub-sidebar {
  border-right-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.staging-tutorial-hub .tutorial-hub-cat-title {
  color: #ddd6fe;
}

html.theme-night.staging-tutorial-hub .tutorial-cat-list li a,
html.theme-night.staging-tutorial-hub .tutorial-cat-list button {
  color: #cbd5e1;
}

html.theme-night.staging-tutorial-hub .tutorial-cat-list li a:hover,
html.theme-night.staging-tutorial-hub .tutorial-cat-list button:hover,
html.theme-night.staging-tutorial-hub .tutorial-cat-list button.active {
  color: #f5d0fe;
  background: rgba(236, 72, 153, 0.12);
}

html.theme-night.staging-tutorial-hub .tutorial-cat-list .cnt {
  color: #64748b;
}

html.theme-night.staging-tutorial-hub .tutorial-article-list li {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.staging-tutorial-hub .tutorial-article-list li:hover {
  background: rgba(255, 255, 255, 0.04);
}

html.theme-night.staging-tutorial-hub .tutorial-article-list .tut-info a,
html.theme-night.staging-tutorial-hub .tutorial-article-list .tut-title--guest {
  color: #f1f5f9;
}

html.theme-night.staging-tutorial-hub .tutorial-article-list .tut-info a:hover {
  color: #f9a8d4;
}

html.theme-night.staging-tutorial-hub .tutorial-article-list .meta {
  color: #94a3b8;
}

html.theme-night.staging-tutorial-hub .tutorial-article-list .tutorial-list-hint {
  color: #e9d5ff;
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.28), rgba(30, 36, 48, 0.72));
}

html.theme-night.staging-tutorial-hub .tutorial-article-list .tutorial-list-hint a {
  color: #f9a8d4;
}

html.theme-night.staging-tutorial-hub .tutorial-article {
  color: #e2e8f0;
}

html.theme-night.staging-tutorial-hub .tutorial-article figcaption {
  color: #94a3b8;
}

html.theme-night.staging-tutorial-hub .tutorial-article-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.staging-tutorial-hub .tutorial-article-h1 {
  color: #f8fafc;
}

html.theme-night.staging-tutorial-hub .tutorial-article-lead {
  color: #94a3b8;
}

html.theme-night.staging-tutorial-hub .tutorial-article-meta {
  color: #c4b5fd;
}

html.theme-night.staging-tutorial-hub .tutorial-read-locked {
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: rgba(236, 72, 153, 0.72);
  background: rgba(30, 36, 48, 0.88);
  color: #e9d5ff !important;
}

html.theme-night.staging-tutorial-hub .tutorial-read-locked * {
  color: inherit !important;
}

html.theme-night.staging-tutorial-hub .tutorial-article-nav {
  border-top-color: rgba(255, 255, 255, 0.08);
}

html.theme-night.staging-tutorial-hub .tutorial-read-locked__title {
  color: #f1f5f9 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-read-locked__desc {
  color: #94a3b8 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-footer,
html.theme-night.staging-tutorial-hub .tutorial-footer a {
  color: #94a3b8;
}

html.theme-night.staging-tutorial-hub .tutorial-footer a:hover {
  color: #f9a8d4;
}

/* 夜间阅读层：正文区统一浅色，兼容全部教程 HTML 格式 */
html.theme-night.staging-tutorial-hub .tutorial-content.tutorial-content--night-read {
  color: #334155;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 52%, #f6f3ff 100%);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 22px;
  padding: clamp(20px, 3.2vw, 34px);
  margin-top: 6px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .post-content,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read .post-body,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read.doc2-import,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read .auto-tool-guide,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide {
  color: inherit;
  background: transparent !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read :is(h1, h2, h3, h4, h5, h6, .tutorial-article-h2) {
  color: #111827 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .tutorial-article-h2,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read h2 {
  padding-left: 14px;
  border-left: 4px solid #ec4899;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read :is(p, li, td, th, dd, figcaption, label, .tutorial-p) {
  color: #334155;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read :is(strong, b) {
  color: #111827;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .text-muted,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read .muted {
  color: #64748b !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read :is(.tutorial-coincheck-lang-note, .tutorial-okj-lang-note) {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  color: #14532d !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read a {
  color: #7c3aed !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read a:hover {
  color: #db2777 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read :is(blockquote, .tutorial-blockquote) {
  background: rgba(250, 245, 255, 0.96) !important;
  border: 1px solid rgba(124, 58, 237, 0.16) !important;
  border-left: 4px solid rgba(236, 72, 153, 0.72) !important;
  color: #4c1d95 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read :is(blockquote *, .tutorial-blockquote *) {
  color: inherit !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read code {
  background: #f4f0ff !important;
  border: 1px solid #e9ddff;
  color: #5b21b6 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read pre {
  background: #f8f4ff !important;
  border: 1px solid rgba(124, 58, 237, 0.14) !important;
  color: #31204c !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read img {
  box-sizing: border-box;
  max-width: 100%;
  height: auto;
  padding: 6px;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1px solid rgba(124, 58, 237, 0.12) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1) !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .mp4-video-container,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read video,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read iframe {
  max-width: 100%;
  border-radius: 12px;
  background: #fff;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read figure {
  margin: 1rem 0 1.4rem;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: #334155;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read table :is(th, td) {
  border: 1px solid rgba(124, 58, 237, 0.12);
  padding: 10px 12px;
  color: #334155 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read table th {
  background: #f8f4ff !important;
  color: #31204c !important;
}

/* RPA 图文指南组件（内嵌 style 同步校正） */
html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-hero {
  background: linear-gradient(135deg, #fff7ed, #f4efff 52%, #eef9ff) !important;
  border-color: #e9e2f3 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-hero h2,
html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide h2 {
  border-left: 0 !important;
  padding-left: 0 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-card {
  background: #fff !important;
  border-color: #e9e2f3 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-card strong {
  color: #20172d !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-card span {
  color: #6b6477 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-note {
  background: #fff8e8 !important;
  border-color: #f2d49b !important;
  color: #6f4300 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-note.rpa-safe {
  background: #f0fdf4 !important;
  border-color: #b7e4c7 !important;
  color: #14532d !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-note.rpa-danger {
  background: #fff1f2 !important;
  border-color: #fecaca !important;
  color: #7f1d1d !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide :is(.rpa-shot, .rpa-fig) {
  background: #f7fbff !important;
  border-color: #cfe8ee !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-window {
  background: #fff !important;
  border-color: #ded7ec !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-titlebar {
  background: linear-gradient(135deg, #f7f3ff, #ebe4ff) !important;
  color: #31204c !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-body {
  background: #fff !important;
  color: #334155 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-pill {
  background: #fff !important;
  border-color: #e2d8f3 !important;
  color: #4c1d95 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-table {
  background: #fff !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-table th {
  background: #f8f4ff !important;
  color: #31204c !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-legend {
  background: #fff !important;
  border-color: #9cced8 !important;
  color: #3f6878 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-legend b {
  color: #168aad !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .jiyu-rpa-v2-guide .rpa-fig figcaption {
  color: #134e5e !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .auto-tool-guide figure div[style] {
  color: #20172d;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .tutorial-faq dt {
  color: #111827 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .tutorial-faq dd {
  color: #64748b !important;
}

html.theme-night.staging-tutorial-hub .tutorial-content--night-read .tutorial-img-placeholder {
  background: rgba(250, 245, 255, 0.92) !important;
  border-color: rgba(124, 58, 237, 0.24) !important;
  color: #5b21b6 !important;
}

html.theme-night.staging-tutorial-hub .tutorial-article a.tutorial-back-btn,
html.theme-night.staging-tutorial-hub .tutorial-article a.tutorial-read-locked__btn {
  color: #fff !important;
}

html.theme-night.staging-tutorial-hub.preview-embed-mode .preview-tutorial-page {
  background: transparent;
}

html.theme-night.staging-tutorial-hub.preview-embed-mode .tutorial-hub-shell {
  background: transparent;
}

@media (max-width: 860px) {
  html.theme-night.staging-tutorial-hub .tutorial-hub-sidebar {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  html.theme-night.staging-tutorial-hub .tutorial-content.tutorial-content--night-read {
    padding: 16px 14px;
    border-radius: 18px;
  }
}

/* Facebook 快速回复工作台 */
.preview-fb-reply-page .fb-reply-hero {
  margin-bottom: 18px;
}

.preview-fb-reply-page .fb-reply-workbench .translate-pane {
  height: auto;
  min-height: 420px;
  max-height: none;
}

.preview-fb-reply-page .fb-reply-controls {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.preview-fb-reply-page .fb-reply-group {
  display: grid;
  gap: 8px;
}

.preview-fb-reply-page .fb-reply-group--lang {
  max-width: 220px;
}

.preview-fb-reply-page .fb-reply-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.preview-fb-reply-page .fb-reply-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-fb-reply-page .fb-chip {
  border: 1px solid rgba(225, 29, 138, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #7a294f;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.preview-fb-reply-page .fb-chip:hover {
  background: #fff7fb;
}

.preview-fb-reply-page .fb-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 138, 0.18);
}

.preview-fb-reply-page .fb-reply-group--lang select {
  height: 42px;
  border: 1px solid rgba(219, 39, 119, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
}

.preview-fb-reply-page #fb-source {
  flex: 1 1 auto;
  min-height: 180px;
  border: 0;
  resize: vertical;
  padding: 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.65;
}

.preview-fb-reply-page .fb-context-wrap {
  border-top: 1px solid rgba(226, 173, 157, 0.32);
  padding: 12px 16px 14px;
}

.preview-fb-reply-page .fb-context-wrap label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #9a4f67;
}

.preview-fb-reply-page .fb-context-wrap textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid rgba(225, 29, 138, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.preview-fb-reply-page .fb-output-edit {
  flex: 1 1 auto;
  min-height: 260px;
  border: 0;
  resize: vertical;
  padding: 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
}

.preview-fb-reply-page .fb-reply-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(226, 173, 157, 0.32);
}

.preview-fb-reply-page .fb-reply-status {
  margin: 12px 4px 0;
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #7a294f;
}

.preview-fb-reply-page .fb-reply-status[data-mode="ok"] {
  color: #15803d;
}

.preview-fb-reply-page .fb-reply-status[data-mode="error"] {
  color: #b91c1c;
}

.preview-fb-reply-page .fb-reply-status[data-mode="loading"] {
  color: #9a4f67;
}

@media (max-width: 900px) {
  .preview-fb-reply-page .translate-dual {
    grid-template-columns: 1fr;
  }
}

/* Facebook 快速回复 — InstaReply 风格落地页 */
.preview-fb-ext-landing {
  background: #fff;
}

.preview-fb-ext-landing .preview-nav {
  background: rgba(255, 250, 244, 0.92);
}

.preview-fb-ext-landing .fb-lp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.preview-fb-ext-landing .fb-lp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.preview-fb-ext-landing .fb-lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.preview-fb-ext-landing .fb-lp-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.preview-fb-ext-landing .fb-lp-menu {
  position: relative;
}

.preview-fb-ext-landing .fb-lp-menu summary {
  list-style: none;
  padding: 8px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  background: #fff;
}

.preview-fb-ext-landing .fb-lp-menu summary::-webkit-details-marker {
  display: none;
}

.preview-fb-ext-landing .fb-lp-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.preview-fb-ext-landing .fb-lp-menu__panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
}

.preview-fb-ext-landing .fb-lp-menu__panel a:hover,
.preview-fb-ext-landing .fb-lp-menu__panel a.is-active {
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
}

.preview-fb-ext-landing .fb-lp-hero {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 38%, #c026d3 72%, #ec4899 100%);
  color: #fff;
  padding: 56px 0 72px;
}

.preview-fb-ext-landing .fb-lp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 48px;
  align-items: center;
}

.preview-fb-ext-landing .fb-lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.preview-fb-ext-landing .fb-lp-title {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.8vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.preview-fb-ext-landing .fb-lp-title em {
  font-style: normal;
  color: #fde047;
}

.preview-fb-ext-landing .fb-lp-lead {
  margin: 0 0 24px;
  max-width: 540px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.preview-fb-ext-landing .fb-lp-lead strong {
  color: #fff;
  font-weight: 800;
}

.preview-fb-ext-landing .fb-lp-platforms {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 560px;
}

.preview-fb-ext-landing .fb-lp-platforms li {
  flex: 1 1 220px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.5;
}

.preview-fb-ext-landing .fb-lp-platforms strong {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
  color: #fff;
}

.preview-fb-ext-landing .fb-lp-platforms span {
  color: rgba(255, 255, 255, 0.82);
}

.preview-fb-ext-landing .fb-lp-hero-switch {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
  background: #fff;
}

.preview-fb-ext-landing .fb-lp-hero-switch__btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #f3f4f6;
  color: #4b5563;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.preview-fb-ext-landing .fb-lp-hero-switch__btn.is-active {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
}

.preview-fb-ext-landing .fb-demo-scene--instagram {
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
}

.preview-fb-ext-landing .fb-lp-demo__stage .fb-demo-panel {
  bottom: 16px;
  width: min(340px, calc(100% - 32px));
}

.preview-fb-ext-landing .ig-demo-feed {
  padding: 16px;
}

.preview-fb-ext-landing .ig-demo-post {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.preview-fb-ext-landing .ig-demo-post__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 0;
}

.preview-fb-ext-landing .ig-demo-post__head strong {
  display: block;
  font-size: 14px;
  color: #111827;
}

.preview-fb-ext-landing .ig-demo-post__head span {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

.preview-fb-ext-landing .ig-demo-post__media {
  height: 140px;
  margin: 10px 14px 0;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(219, 39, 119, 0.18), rgba(124, 58, 237, 0.18)),
    linear-gradient(45deg, #fce7f3 25%, #ede9fe 50%, #fdf2f8 75%);
}

.preview-fb-ext-landing .ig-demo-post__caption {
  margin: 0;
  padding: 12px 14px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

.preview-fb-ext-landing .ig-demo-composer {
  margin: 12px 14px 14px;
}

.preview-fb-ext-landing .fb-demo-ir-btn--ig {
  background: linear-gradient(135deg, #db2777, #e11d8a);
  color: #fff;
  border-color: transparent;
}

.preview-fb-ext-landing .fb-demo-panel__options {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}

.preview-fb-ext-landing .fb-demo-panel__option {
  border: 1px solid rgba(219, 39, 119, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffafb;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  color: #111827;
}

.preview-fb-ext-landing .fb-demo-panel__option.is-active {
  border-color: #db2777;
  background: linear-gradient(135deg, #fff1f7, #fff7fb);
  box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.12);
}

.preview-fb-ext-landing .fb-lp-demo__tab--ig.is-active {
  background: linear-gradient(135deg, #db2777, #be185d);
  color: #fff;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel__options {
  max-height: 150px;
}

.preview-fb-ext-landing .fb-lp-cta-wrap {
  margin-bottom: 18px;
}

.preview-fb-ext-landing .fb-lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  align-items: flex-start;
}

.preview-fb-ext-landing .fb-lp-install-item {
  flex: 1 1 240px;
  max-width: 320px;
}

.preview-fb-ext-landing .fb-lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 14px;
  background: #facc15;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.preview-fb-ext-landing .fb-lp-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
}

.preview-fb-ext-landing .fb-lp-cta.is-pending {
  background: #9ca3af;
  color: #f9fafb;
  box-shadow: none;
  pointer-events: none;
}

.preview-fb-ext-landing .fb-lp-cta--ig {
  background: linear-gradient(135deg, #f472b6 0%, #db2777 55%, #be185d 100%);
  color: #fff;
}

.preview-fb-ext-landing .fb-lp-cta--ig:hover {
  box-shadow: 0 20px 42px rgba(190, 24, 93, 0.35);
}

.preview-fb-ext-landing .fb-lp-cta__platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.preview-fb-ext-landing .fb-lp-cta__arrow {
  font-size: 20px;
  line-height: 1;
}

.preview-fb-ext-landing .fb-lp-store-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 480px;
}

.preview-fb-ext-landing .fb-lp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.preview-fb-ext-landing .fb-lp-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
}

.preview-fb-ext-landing .fb-lp-stars {
  color: #fde047;
  letter-spacing: 1px;
}

.preview-fb-ext-landing .fb-lp-score {
  color: #fff;
}

.preview-fb-ext-landing .fb-lp-users {
  color: rgba(255, 255, 255, 0.88);
}

.preview-fb-ext-landing .fb-lp-account {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.preview-fb-ext-landing .fb-lp-account.is-ok {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(110, 231, 183, 0.35);
}

.preview-fb-ext-landing .fb-lp-account.is-warn {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(252, 211, 77, 0.35);
}

.preview-fb-ext-landing .fb-lp-account__line {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.preview-fb-ext-landing .fb-lp-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-fb-ext-landing .fb-lp-account__btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.preview-fb-ext-landing .fb-lp-account__btn--primary {
  background: rgba(255, 255, 255, 0.18);
}

.preview-fb-ext-landing .fb-lp-visual-frame {
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.preview-fb-ext-landing .fb-lp-visual-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.preview-fb-ext-landing .fb-lp-hero-preview {
  background: #fff;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-browser {
  min-height: 0;
}

.preview-fb-ext-landing .fb-demo-scene-slot {
  position: relative;
  min-height: 360px;
  background: #f0f2f5;
}

.preview-fb-ext-landing .fb-demo-scene-slot .fb-demo-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
}

.preview-fb-ext-landing .fb-demo-scene[hidden] {
  display: none !important;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-scene-slot {
  min-height: 300px;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-scene {
  min-height: 100%;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-feed {
  padding: 12px;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-post__text,
.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-bubble p {
  font-size: 12px;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel {
  right: 12px;
  bottom: 12px;
  width: min(280px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel:not(.is-open) {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel__source[contenteditable] {
  outline: none;
  cursor: text;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel__source[contenteditable]:focus {
  border-color: rgba(219, 39, 119, 0.42);
  box-shadow: 0 0 0 2px rgba(219, 39, 119, 0.12);
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel__chips button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 138, 0.18);
  background: #fff7fb;
  color: #9d174d;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-panel__chips button.is-active {
  background: linear-gradient(135deg, #db2777, #e11d8a);
  color: #fff;
  border-color: transparent;
}

.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-input.is-filled {
  color: #111827;
}

.preview-fb-ext-landing .fb-lp-stats {
  background: #111827;
  color: #fff;
  padding: 34px 0;
}

.preview-fb-ext-landing .fb-lp-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  text-align: center;
}

.preview-fb-ext-landing .fb-lp-stat__icon {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  color: #facc15;
}

.preview-fb-ext-landing .fb-lp-stat__num {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  color: #fde047;
}

.preview-fb-ext-landing .fb-lp-stat__label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.preview-fb-ext-landing .fb-lp-demo {
  padding: 72px 0 56px;
  background: #fff;
}

.preview-fb-ext-landing .fb-lp-demo__title {
  margin: 0 0 10px;
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  color: #111827;
}

.preview-fb-ext-landing .fb-lp-demo__sub {
  margin: 0 auto 32px;
  max-width: 640px;
  text-align: center;
  font-size: 17px;
  color: #7c3aed;
  font-weight: 700;
}

.preview-fb-ext-landing .fb-lp-demo__card {
  max-width: 920px;
  margin: 0 auto 40px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
  background: #fff;
}

.preview-fb-ext-landing .fb-lp-demo__mock-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fafafa;
}

.preview-fb-ext-landing .fb-lp-demo__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.preview-fb-ext-landing .fb-lp-demo__tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: #f3f4f6;
  gap: 4px;
}

.preview-fb-ext-landing .fb-lp-demo__tab {
  border: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.preview-fb-ext-landing .fb-lp-demo__tab.is-active {
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.preview-fb-ext-landing .fb-lp-demo__replay {
  border: 1px solid rgba(124, 58, 237, 0.22);
  padding: 7px 12px;
  border-radius: 999px;
  background: #faf5ff;
  color: #6d28d9;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.preview-fb-ext-landing .fb-lp-demo__stage {
  position: relative;
  background: #f8fafc;
}

.preview-fb-ext-landing .fb-lp-demo__caption {
  margin: 0;
  padding: 14px 18px 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #6d28d9;
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.04));
}

.preview-fb-ext-landing .fb-lp-demo__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #a78bfa);
}

.preview-fb-ext-landing .fb-lp-demo__mock-head strong {
  display: block;
  font-size: 15px;
  color: #111827;
}

.preview-fb-ext-landing .fb-lp-demo__mock-head span {
  font-size: 13px;
  color: #6b7280;
}

.preview-fb-ext-landing .fb-demo-browser {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.preview-fb-ext-landing .fb-demo-browser__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #e5e7eb;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.preview-fb-ext-landing .fb-demo-browser__dots {
  display: inline-flex;
  gap: 5px;
}

.preview-fb-ext-landing .fb-demo-browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  font-style: normal;
}

.preview-fb-ext-landing .fb-demo-browser__dots i:nth-child(1) {
  background: #fca5a5;
}

.preview-fb-ext-landing .fb-demo-browser__dots i:nth-child(2) {
  background: #fde047;
}

.preview-fb-ext-landing .fb-demo-browser__dots i:nth-child(3) {
  background: #86efac;
}

.preview-fb-ext-landing .fb-demo-browser__url {
  flex: 1;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.preview-fb-ext-landing .fb-demo-scene-slot {
  position: relative;
  min-height: 420px;
  background: #f0f2f5;
}

.preview-fb-ext-landing .fb-demo-scene-slot .fb-demo-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
}

.preview-fb-ext-landing .fb-demo-scene[hidden] {
  display: none !important;
}

.preview-fb-ext-landing .fb-demo-scene {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  background: #f0f2f5;
}

.preview-fb-ext-landing .fb-demo-scene--message,
.preview-fb-ext-landing .fb-demo-scene--instagram {
  display: block;
}

.preview-fb-ext-landing .fb-demo-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  background: #fff;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.preview-fb-ext-landing .fb-demo-sidebar__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1877f2;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
}

.preview-fb-ext-landing .fb-demo-sidebar span:not(.fb-demo-sidebar__logo) {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #e5e7eb;
}

.preview-fb-ext-landing .fb-demo-feed {
  padding: 16px;
}

.preview-fb-ext-landing .fb-demo-post,
.preview-fb-ext-landing .fb-demo-thread,
.preview-fb-ext-landing .fb-demo-composer {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.preview-fb-ext-landing .fb-demo-post {
  padding: 14px;
  margin-bottom: 12px;
}

.preview-fb-ext-landing .fb-demo-post__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.preview-fb-ext-landing .fb-demo-post__head strong {
  display: block;
  font-size: 14px;
  color: #111827;
}

.preview-fb-ext-landing .fb-demo-post__head span {
  font-size: 12px;
  color: #6b7280;
}

.preview-fb-ext-landing .fb-demo-post__text {
  margin: 0 0 10px;
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
}

.preview-fb-ext-landing .fb-demo-post__actions {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #6b7280;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.preview-fb-ext-landing .fb-demo-thread {
  padding: 12px 14px;
  margin-bottom: 12px;
}

.preview-fb-ext-landing .fb-demo-comment {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.preview-fb-ext-landing .fb-demo-bubble {
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f3f4f6;
}

.preview-fb-ext-landing .fb-demo-bubble strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #111827;
}

.preview-fb-ext-landing .fb-demo-bubble p {
  margin: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

.preview-fb-ext-landing .fb-demo-composer {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  align-items: flex-start;
}

.preview-fb-ext-landing .fb-demo-composer__box {
  flex: 1;
  position: relative;
}

.preview-fb-ext-landing .fb-demo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #c4b5fd, #f9a8d4);
}

.preview-fb-ext-landing .fb-demo-avatar--page {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.preview-fb-ext-landing .fb-demo-avatar--user {
  background: linear-gradient(135deg, #60a5fa, #34d399);
}

.preview-fb-ext-landing .fb-demo-avatar--me {
  background: linear-gradient(135deg, #f472b6, #fb923c);
}

.preview-fb-ext-landing .fb-demo-input {
  min-height: 40px;
  padding: 10px 88px 10px 12px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 13px;
  color: #111827;
  line-height: 1.5;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.preview-fb-ext-landing .fb-demo-input:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
}

.preview-fb-ext-landing .fb-demo-input.is-filled {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.28);
}

.preview-fb-ext-landing .fb-demo-ir-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #db2777, #e11d8a);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: default;
  box-shadow: 0 6px 16px rgba(225, 29, 138, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.preview-fb-ext-landing .fb-demo-ir-btn.is-pulse {
  animation: fb-demo-pulse 1.1s ease-in-out infinite;
}

@keyframes fb-demo-pulse {
  0%,
  100% {
    box-shadow: 0 6px 16px rgba(225, 29, 138, 0.28);
    transform: translateY(-50%) scale(1);
  }
  50% {
    box-shadow: 0 10px 24px rgba(225, 29, 138, 0.42);
    transform: translateY(-50%) scale(1.04);
  }
}

.preview-fb-ext-landing .fb-demo-messenger {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  background: #fff;
}

.preview-fb-ext-landing .fb-demo-messenger__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.preview-fb-ext-landing .fb-demo-messenger__head strong {
  display: block;
  font-size: 14px;
}

.preview-fb-ext-landing .fb-demo-messenger__head span {
  font-size: 12px;
  color: #6b7280;
}

.preview-fb-ext-landing .fb-demo-messenger__body {
  flex: 1;
  padding: 16px;
  background: linear-gradient(180deg, #fafafa, #fff);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-fb-ext-landing .fb-demo-msg {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.preview-fb-ext-landing .fb-demo-msg--in {
  align-self: flex-start;
  background: #f3f4f6;
  color: #374151;
}

.preview-fb-ext-landing .fb-demo-msg--out {
  align-self: flex-end;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
}

.preview-fb-ext-landing .fb-demo-msg p {
  margin: 0;
}

.preview-fb-ext-landing .fb-demo-messenger__composer {
  position: relative;
  padding: 12px 16px 16px;
  border-top: 1px solid #f3f4f6;
}

.preview-fb-ext-landing .fb-demo-messenger__composer .fb-demo-input {
  padding-right: 88px;
}

.preview-fb-ext-landing .fb-demo-panel {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 72px;
  width: min(320px, calc(100% - 36px));
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(225, 29, 138, 0.2);
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.preview-fb-ext-landing .fb-demo-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.preview-fb-ext-landing .fb-demo-panel.is-loading .fb-demo-panel__out {
  background: linear-gradient(90deg, #fffafb 0%, #fce7f3 50%, #fffafb 100%);
  background-size: 200% 100%;
  animation: fb-demo-shimmer 1s linear infinite;
}

@keyframes fb-demo-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.preview-fb-ext-landing .fb-demo-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.preview-fb-ext-landing .fb-demo-panel__brand {
  font-size: 13px;
  font-weight: 900;
  color: #be185d;
}

.preview-fb-ext-landing .fb-demo-panel__close {
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
}

.preview-fb-ext-landing .fb-demo-panel__label {
  display: block;
  margin: 8px 0 6px;
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
}

.preview-fb-ext-landing .fb-demo-panel__source,
.preview-fb-ext-landing .fb-demo-panel__out {
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #111827;
}

.preview-fb-ext-landing .fb-demo-panel__source {
  border: 1px solid rgba(219, 39, 119, 0.16);
  background: #fff;
  min-height: 44px;
}

.preview-fb-ext-landing .fb-demo-panel__out {
  min-height: 72px;
  border: 1px dashed rgba(219, 39, 119, 0.22);
  background: #fffafb;
  white-space: pre-wrap;
}

.preview-fb-ext-landing .fb-demo-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-fb-ext-landing .fb-demo-panel__chips span {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 138, 0.18);
  background: #fff7fb;
  color: #9d174d;
  font-size: 11px;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.preview-fb-ext-landing .fb-demo-panel__chips span.is-active {
  background: linear-gradient(135deg, #db2777, #e11d8a);
  color: #fff;
  border-color: transparent;
}

.preview-fb-ext-landing .fb-demo-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preview-fb-ext-landing .fb-demo-panel__btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f3f4f6;
  color: #374151;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.preview-fb-ext-landing .fb-demo-panel__btn--primary {
  background: linear-gradient(135deg, #db2777, #e11d8a);
  color: #fff;
}

.preview-fb-ext-landing .fb-demo-panel__btn:disabled {
  opacity: 0.45;
}

.preview-fb-ext-landing .fb-demo-panel__status {
  margin: 8px 0 0;
  min-height: 16px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 700;
}

.preview-fb-ext-landing .fb-demo-panel__status.is-ok {
  color: #059669;
}

.preview-fb-ext-landing .fb-demo-panel__status.is-error {
  color: #dc2626;
}

.preview-fb-ext-landing .fb-demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 22px;
  height: 22px;
  border-radius: 50% 2px 50% 50%;
  background: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translate(-999px, -999px);
  transition: opacity 0.2s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.preview-fb-ext-landing .fb-demo-cursor::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: #fff;
  opacity: 0.15;
}

.preview-fb-ext-landing .fb-demo-cursor.is-visible {
  opacity: 1;
}

.preview-fb-ext-landing .fb-demo-cursor.is-click {
  filter: brightness(1.35);
}

.preview-fb-ext-landing .fb-lp-demo__stage[data-step="2"] .fb-demo-ir-btn,
.preview-fb-ext-landing .fb-lp-demo__stage[data-step="3"] .fb-demo-panel,
.preview-fb-ext-landing .fb-lp-demo__stage[data-step="4"] .fb-demo-panel__btn--primary,
.preview-fb-ext-landing .fb-lp-demo__stage[data-step="5"] .fb-demo-input.is-filled {
  outline: 2px solid rgba(124, 58, 237, 0.35);
  outline-offset: 2px;
}

.preview-fb-ext-landing .fb-lp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.preview-fb-ext-landing .fb-lp-step {
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fafafa;
}

.preview-fb-ext-landing .fb-lp-step__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.preview-fb-ext-landing .fb-lp-step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #111827;
}

.preview-fb-ext-landing .fb-lp-step p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.65;
}

.preview-fb-ext-landing .fb-lp-footer {
  padding: 0 0 48px;
  background: #fff;
}

.preview-fb-ext-landing .fb-lp-details {
  border: 1px dashed rgba(124, 58, 237, 0.22);
  border-radius: 14px;
  padding: 12px 16px;
  background: #faf5ff;
  margin-bottom: 14px;
}

.preview-fb-ext-landing .fb-lp-details summary {
  cursor: pointer;
  font-weight: 800;
  color: #6d28d9;
}

.preview-fb-ext-landing .fb-lp-details ol,
.preview-fb-ext-landing .fb-lp-details ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #4b5563;
}

.preview-fb-ext-landing .fb-lp-details code {
  font-size: 12px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px;
}

.preview-fb-ext-landing .fb-lp-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.preview-fb-ext-landing .fb-lp-note a {
  color: #7c3aed;
  font-weight: 700;
}

@media (max-width: 960px) {
  .preview-fb-ext-landing .fb-lp-hero__grid {
    grid-template-columns: 1fr;
  }

  .preview-fb-ext-landing .fb-lp-hero__visual {
    order: -1;
  }

  .preview-fb-ext-landing .fb-lp-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-fb-ext-landing .fb-lp-steps {
    grid-template-columns: 1fr;
  }

  .preview-fb-ext-landing .fb-lp-demo__toolbar {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .preview-fb-ext-landing .fb-demo-panel {
    right: 10px;
    bottom: 64px;
    width: calc(100% - 20px);
  }
}

@media (max-width: 560px) {
  .preview-fb-ext-landing .fb-lp-hero {
    padding: 36px 0 48px;
  }

  .preview-fb-ext-landing .fb-lp-cta {
    width: 100%;
    justify-content: center;
  }

  .preview-fb-ext-landing .fb-lp-stats__grid {
    grid-template-columns: 1fr;
  }

  .preview-fb-ext-landing .fb-demo-scene {
    grid-template-columns: 1fr;
  }

  .preview-fb-ext-landing .fb-demo-sidebar {
    display: none;
  }

  .preview-fb-ext-landing .fb-lp-demo__tab {
    padding: 7px 10px;
    font-size: 12px;
  }
}

/* ============================================================
   工具发现：分类下拉菜单 / 工具中心 / 相关工具
   ============================================================ */

.utility-menu__panel {
  width: min(460px, calc(100vw - 24px));
  gap: 10px;
  padding: 12px;
}

.utility-menu__search-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  color: #164e63;
  outline: none;
}

.utility-menu__search-input:focus {
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
}

.utility-menu__scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(64vh, 460px);
  overflow-y: auto;
  padding-right: 2px;
}

/* 分类组排成多列网格，整体更矮、一眼扫完 */
.utility-menu__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.utility-menu__group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.utility-menu__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.utility-menu__items--inline {
  flex-direction: row;
  flex-wrap: wrap;
}

.utility-menu__head {
  padding: 0 2px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.78;
}

/* 单行紧凑条目 */
.utility-menu__panel a.utility-menu__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 7px 10px;
  font-weight: 800;
}

.utility-menu__items--inline a.utility-menu__item {
  flex: 1 1 auto;
}

.utility-menu__item-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #0f3b44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.utility-menu__item--plain .utility-menu__item-title {
  font-weight: 900;
}

/* 搜索过滤：display 规则会覆盖 [hidden]，需显式还原隐藏 */
.utility-menu__panel a.utility-menu__item[hidden],
.utility-menu__group[hidden] {
  display: none;
}

.utility-menu__all {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(103, 232, 249, 0.14));
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.utility-menu__all:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.26), rgba(103, 232, 249, 0.26));
}

.utility-menu__empty {
  margin: 6px 2px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.tool-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f472b6, #fb7185);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* 工具中心落地页 */
.tool-hub-hero {
  padding: 40px 0 8px;
}

body[data-preview-tool="tools-hub"] .tool-hub-hero {
  padding: 28px 0 6px;
}

body[data-preview-tool="tools-hub"] .tool-hub-hero h1 {
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 10px;
}

body[data-preview-tool="tools-hub"] .tool-hub-hero .lead {
  font-size: 15px;
  line-height: 1.65;
  max-width: 680px;
}

body[data-preview-tool="tools-hub"] .tool-hub-cat.section--tight {
  padding-top: 10px;
  padding-bottom: 4px;
}

body[data-preview-tool="tools-hub"] .tool-hub-cat .section-head {
  margin-bottom: 8px;
}

body[data-preview-tool="tools-hub"] .tool-hub-cat .section-title {
  font-size: 17px;
}

body[data-preview-tool="tools-hub"] .tool-hub-cat .section-sub {
  font-size: 12px;
  margin-top: 2px;
}

body[data-preview-tool="tools-hub"] .tool-board--hub,
body[data-preview-tool="tools-hub"] .tool-board--featured {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body[data-preview-tool="tools-hub"] .tool-board--hub .tool-card--rich,
body[data-preview-tool="tools-hub"] .tool-board--featured .tool-card--rich {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 12px;
  gap: 4px;
}

body[data-preview-tool="tools-hub"] .tool-board--hub .tool-card--rich strong,
body[data-preview-tool="tools-hub"] .tool-board--featured .tool-card--rich strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0;
  gap: 5px;
}

body[data-preview-tool="tools-hub"] .tool-board--hub .tool-card--rich span,
body[data-preview-tool="tools-hub"] .tool-board--featured .tool-card--rich span {
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-preview-tool="tools-hub"] .tool-board--hub .tool-card:hover,
body[data-preview-tool="tools-hub"] .tool-board--featured .tool-card:hover {
  transform: translateY(-2px);
}

body[data-preview-tool="tools-hub"] .tool-badge {
  font-size: 9px;
  padding: 1px 5px;
}

body[data-preview-tool="tools-hub"] .tool-hub-cat--featured .tool-card--rich {
  min-height: 0;
  border-color: rgba(20, 184, 166, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fffe 100%);
}

body[data-preview-tool="tools-hub"] .tool-hub-cat--featured .section-title {
  font-size: 18px;
}

.tool-hub-search-wrap {
  margin-top: 18px;
  max-width: 460px;
}

.tool-hub-search-wrap input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-size: 15px;
  outline: none;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.tool-hub-search-wrap input:focus {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.14);
}

.tool-board--hub {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-board--featured {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-hub-cat--featured .section-title {
  font-size: clamp(22px, 2.4vw, 28px);
}

.tool-hub-cat--featured .tool-card--rich {
  min-height: 112px;
  border-color: rgba(20, 184, 166, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
}

.tool-hub-preview-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(234, 88, 12, 0.45);
  background: rgba(255, 247, 237, 0.92);
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}

.tool-hub-preview-banner strong {
  color: #c2410c;
}

.tool-card--rich {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card--rich strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-hub-empty {
  margin: 8px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .tool-board--hub,
  .tool-board--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-preview-tool="tools-hub"] .tool-board--hub,
  body[data-preview-tool="tools-hub"] .tool-board--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (min-width: 1280px) {
  body[data-preview-tool="tools-hub"] .tool-board--hub,
  body[data-preview-tool="tools-hub"] .tool-board--featured {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .tool-board--hub,
  .tool-board--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-preview-tool="tools-hub"] .tool-board--hub,
  body[data-preview-tool="tools-hub"] .tool-board--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .utility-menu__groups {
    grid-template-columns: 1fr;
  }
}

/* ---------- 首页精简版 ---------- */
.preview-home-page--simple .home-main {
  padding-bottom: 48px;
}

.preview-home-page--simple .hero--simple {
  padding: 56px 0 32px;
}

.preview-home-page--simple .hero--simple::after {
  display: none;
}

.preview-home-page--simple .home-hero {
  max-width: 720px;
}

.preview-home-page--simple .hero--simple h1 {
  font-size: clamp(36px, 4.8vw, 52px);
  line-height: 1.08;
  max-width: none;
  margin-bottom: 16px;
}

.preview-home-page--simple .home-lead {
  max-width: 540px;
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.preview-home-page--simple .home-actions {
  margin-top: 28px;
  flex-wrap: wrap;
}

.preview-home-page--simple .home-note {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.preview-home-page--simple .home-products {
  padding: 24px 0 40px;
}

.preview-home-page--simple .home-section-title {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-home-page--simple .home-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.preview-home-page--simple .home-product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.preview-home-page--simple .home-product:hover {
  transform: translateY(-2px);
  border-color: rgba(225, 29, 138, 0.22);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.1);
}

.preview-home-page--simple .home-product__label {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}

.preview-home-page--simple .home-product p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
}

.preview-home-page--simple .home-product__link {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}

.preview-home-page--simple .home-more {
  padding: 8px 0 0;
}

.preview-home-page--simple .home-more__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 14px;
  color: var(--muted);
}

.preview-home-page--simple .home-more__inner a {
  color: #374151;
  font-weight: 600;
  text-decoration: none;
}

.preview-home-page--simple .home-more__inner a:hover {
  color: var(--brand);
}

@media (max-width: 640px) {
  .preview-home-page--simple .hero--simple {
    padding-top: 36px;
  }

  .preview-home-page--simple .home-product-grid {
    grid-template-columns: 1fr;
  }

  .preview-home-page--simple .home-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Maps 抓官网中心 */
.maps-hub-workbench {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.maps-hub-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.maps-hub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.maps-hub-tab {
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.maps-hub-tab.active {
  background: var(--brand, #2563eb);
  border-color: transparent;
  color: #fff;
}

.maps-hub-panel {
  display: none;
}

.maps-hub-panel.active {
  display: block;
}

.maps-hub-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.maps-hub-status {
  margin: 0;
  font-size: 13px;
  min-height: 1.2em;
}

.maps-hub-status--ok {
  color: #047857;
}

.maps-hub-status--err {
  color: #b91c1c;
}

.maps-hub-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.maps-hub-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #e5e7eb;
  color: #374151;
}

.maps-hub-badge--done {
  background: #d1fae5;
  color: #065f46;
}

.maps-hub-badge--failed {
  background: #fee2e2;
  color: #991b1b;
}

.maps-hub-badge--running,
.maps-hub-badge--queued {
  background: #dbeafe;
  color: #1d4ed8;
}

.maps-hub-error {
  color: #b91c1c;
  font-size: 13px;
}

.maps-hub-actions {
  flex-wrap: wrap;
}

.maps-hub-table-wrap {
  overflow: auto;
  max-height: 360px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
}

.maps-hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.maps-hub-table th,
.maps-hub-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  text-align: left;
  vertical-align: top;
}

.maps-hub-url a {
  word-break: break-all;
}

.maps-hub-history-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.maps-hub-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.maps-hub-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
}

.maps-hub-history-item:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.maps-hub-history-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.maps-hub-history-count {
  font-size: 12px;
  color: var(--muted, #6b7280);
}

/* ===== Poe 布局 + 极域浅色主色 ===== */
.preview-ai-page.poe-app {
  --poe-content-width: 768px;
  --poe-content-gutter: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(236, 72, 153, 0.14), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(249, 115, 22, 0.14), transparent 32%),
    linear-gradient(180deg, #fffaf4 0%, var(--bg) 46%, #ffffff 100%);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  margin: 0;
}

.poe-app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  transition: grid-template-columns 0.22s ease;
}

body.poe-sidebar-collapsed .poe-app-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.poe-sidebar-collapsed .poe-sidebar {
  overflow: hidden;
  padding: 0;
  border-right: 0;
  opacity: 0;
  pointer-events: none;
}

.poe-sidebar-collapse,
.poe-sidebar-expand {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  flex: 0 0 auto;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.poe-sidebar-collapse:hover,
.poe-sidebar-expand:hover {
  background: #fff1f7;
  border-color: rgba(236, 72, 153, 0.28);
}

.poe-sidebar-expand-bar {
  display: none;
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 25;
  padding: 0;
  pointer-events: none;
}

.poe-sidebar-expand-bar:not([hidden]) {
  display: block;
}

.poe-sidebar-expand-bar .poe-sidebar-expand {
  pointer-events: auto;
}

.chat-head-main .poe-sidebar-expand:not([hidden]) {
  display: inline-grid;
}

@media (min-width: 961px) {
  .poe-sidebar-collapse {
    display: inline-grid;
  }

  .poe-sidebar-expand-bar:not([hidden]) .poe-sidebar-expand {
    display: inline-grid;
  }
}

.poe-sidebar.is-guest .poe-search,
.poe-sidebar.is-guest .poe-thread-list {
  display: none !important;
}

.poe-thread-list.is-thread-appear {
  animation: poe-thread-list-appear 0.22s ease-out;
}

/* 侧栏列表稳定 — 关闭进场动画/隔离重绘，减轻偶发闪烁（正式+内测） */
body.poe-thread-stable .poe-thread-list.is-thread-appear,
body.staging-thread-stable .poe-thread-list.is-thread-appear {
  animation: none;
}
body.poe-thread-stable .poe-thread-list,
body.staging-thread-stable .poe-thread-list {
  contain: content;
}
body.poe-thread-stable .poe-composer-model-menu,
body.staging-thread-stable .poe-composer-model-menu {
  contain: layout style;
}

@keyframes poe-thread-list-appear {
  from {
    opacity: 0.35;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.poe-sidebar.is-auth-pending .poe-thread-list {
  opacity: 0.92;
}

.poe-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 14px 10px 10px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(84, 54, 25, 0.04);
}

.poe-sidebar__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.poe-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
}

.poe-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 14px;
}

.poe-new-chat {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.08);
}

.poe-new-chat:hover {
  background: #fff1f7;
  border-color: rgba(236, 72, 153, 0.28);
  transform: translateY(-1px);
}

.poe-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 10px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
}

.poe-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.poe-search input::placeholder {
  color: var(--muted);
}

.poe-thread-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 0 -2px;
  padding-right: 2px;
}

.poe-thread-group__label {
  margin: 10px 0 6px;
  padding: 0 10px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.poe-thread-group:first-child .poe-thread-group__label {
  margin-top: 0;
}

.poe-thread-empty {
  margin: 10px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.poe-thread-row {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 2px;
  border-radius: 12px;
  /* 与侧栏 backdrop-filter 隔离，避免 hover 半透明背景反复重绘闪烁 */
  isolation: isolate;
  transform: translateZ(0);
}

.poe-thread-row:hover {
  background: #fff5f9;
}

.poe-thread-row.is-active {
  background: #fff1f7;
}

.poe-thread-row.is-unread .poe-thread__title {
  font-weight: 800;
}

.poe-thread-row.is-unread .poe-thread__title::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--brand);
  vertical-align: 1px;
}

.poe-thread-row.is-muted .poe-thread__preview {
  opacity: 0.55;
}

.poe-thread {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 10px 36px 10px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.poe-thread__avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.poe-thread__avatar--love {
  background: linear-gradient(135deg, #f472b6, #ec4899);
}

.poe-thread__avatar--life {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

.poe-thread__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.poe-thread__top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.poe-thread__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.poe-thread-row.is-active .poe-thread__title {
  color: #be185d;
}

.poe-thread__time {
  flex: 0 0 auto;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.poe-thread__preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.4;
}

.poe-thread__menu {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  /* 始终可命中：避免 opacity/pointer-events 切换在边缘造成悬停闪烁回路 */
  opacity: 0.55;
  pointer-events: auto;
  transition: background 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

.poe-thread-row:hover .poe-thread__menu,
.poe-thread-row.is-active .poe-thread__menu,
.poe-thread-row.is-menu-open .poe-thread__menu,
.poe-thread__menu:hover,
.poe-thread__menu:focus-visible {
  opacity: 1;
}

.poe-thread__menu:hover {
  background: rgba(236, 72, 153, 0.1);
  color: #be185d;
}

.poe-thread-row.is-renaming .poe-thread__menu {
  opacity: 0.35;
  pointer-events: none;
}

.poe-thread-rename-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 2px 7px;
  border: 1px solid rgba(236, 72, 153, 0.45);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.poe-thread-rename-input:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.65);
}

.poe-thread-menu {
  position: fixed;
  z-index: 120;
  min-width: 188px;
  padding: 6px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14), 0 2px 8px rgba(17, 24, 39, 0.06);
}

.poe-thread-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.poe-thread-menu__item svg {
  flex: 0 0 auto;
  color: #6b7280;
}

.poe-thread-menu__item:hover {
  background: rgba(236, 72, 153, 0.08);
}

.poe-thread-menu__item--danger {
  color: #dc2626;
}

.poe-thread-menu__item--danger svg {
  color: #dc2626;
}

.poe-thread-menu__item--danger:hover {
  background: rgba(254, 226, 226, 0.85);
}

.poe-sidebar__footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 12px 2px 4px;
  border-top: 1px solid rgba(84, 54, 25, 0.08);
}

.poe-sidebar__links {
  display: grid;
  gap: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}

.poe-sidebar__auth {
  margin-top: 10px;
  padding: 0 2px;
  font-size: 13px;
}

.poe-sidebar__links a,
.poe-sidebar__links .poe-sidebar__link {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.poe-sidebar__links a:hover,
.poe-sidebar__links .poe-sidebar__link:hover {
  color: var(--ink);
  background: rgba(236, 72, 153, 0.06);
}

.poe-sidebar__auth a {
  color: var(--ink);
}

.poe-sidebar__ai-provider {
  margin: 10px 2px 0;
  padding: 0 2px 2px;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(107, 114, 128, 0.78);
  text-align: center;
}

.poe-sidebar__ai-provider a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.poe-sidebar__ai-provider a:hover {
  color: var(--ink);
}

.poe-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: transparent;
  overflow: hidden;
  position: relative;
}

/* 首页：Logo + 输入框在整体高度垂直居中，工具区在下半区底部 */
.poe-main[data-view="home"] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.poe-main[data-view="home"] .poe-home__hero {
  grid-row: 2;
  margin-top: 0;
  flex-shrink: 0;
  padding: 0 20px 10px;
}

.poe-main[data-view="home"] .poe-logo {
  margin-bottom: 14px;
}

.poe-main[data-view="home"] .poe-composer {
  grid-row: 3;
  flex-shrink: 0;
  padding-bottom: 6px;
}

.poe-main[data-view="home"] .poe-explore {
  grid-row: 4;
  align-self: end;
  margin-top: 0;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding: 0 20px 8px;
}

.poe-main[data-view="home"] .poe-explore-grid {
  gap: 6px 8px;
  padding: 2px 0 4px;
}

.poe-main[data-view="home"] .poe-bot-card {
  gap: 4px;
  width: 76px;
}

.poe-main[data-view="home"] .poe-bot-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(84, 54, 25, 0.12);
}

.poe-main[data-view="home"] .poe-bot-card__svg {
  width: 28px;
  height: 28px;
}

.poe-main[data-view="home"] .poe-bot-card__svg--fill {
  width: 24px;
  height: 24px;
}

.poe-main[data-view="home"] .poe-bot-card__name {
  max-width: 76px;
  font-size: 11px;
}

.poe-main[data-view="home"] .poe-bot-card__badge {
  margin-top: -62px;
  margin-left: 40px;
}

.poe-main[data-view="home"] #poe-chat-panel {
  display: none !important;
}

/* 对话页：消息区 + 底部输入框 */
.poe-main[data-view="chat"] {
  grid-template-rows: minmax(0, 1fr) auto;
}

.poe-main[data-view="chat"] .poe-home__hero,
.poe-main[data-view="chat"] .poe-explore {
  display: none !important;
}

.poe-main[data-view="chat"] #poe-chat-panel {
  grid-row: 1;
  min-height: 0;
}

.poe-main[data-view="chat"] .poe-composer {
  grid-row: 2;
}

/* 会员 / 更新日志 / 翻译 / RPA / FB 插件：右侧全屏滚动，左侧栏不动 */
.poe-main[data-view="member"],
.poe-main[data-view="changelog"],
.poe-main[data-view="translate"],
.poe-main[data-view="rpa"],
.poe-main[data-view="fb-reply"],
.poe-main[data-view="tools"],
.poe-main[data-view="account"],
.poe-main[data-view="embed"] {
  grid-template-rows: minmax(0, 1fr);
}

.poe-main[data-view="member"] .poe-home__hero,
.poe-main[data-view="member"] .poe-composer,
.poe-main[data-view="member"] .poe-explore,
.poe-main[data-view="member"] #poe-chat-panel,
.poe-main[data-view="changelog"] .poe-home__hero,
.poe-main[data-view="changelog"] .poe-composer,
.poe-main[data-view="changelog"] .poe-explore,
.poe-main[data-view="changelog"] #poe-chat-panel,
.poe-main[data-view="translate"] .poe-home__hero,
.poe-main[data-view="translate"] .poe-composer,
.poe-main[data-view="translate"] .poe-explore,
.poe-main[data-view="translate"] #poe-chat-panel,
.poe-main[data-view="rpa"] .poe-home__hero,
.poe-main[data-view="rpa"] .poe-composer,
.poe-main[data-view="rpa"] .poe-explore,
.poe-main[data-view="rpa"] #poe-chat-panel,
.poe-main[data-view="fb-reply"] .poe-home__hero,
.poe-main[data-view="fb-reply"] .poe-composer,
.poe-main[data-view="fb-reply"] .poe-explore,
.poe-main[data-view="fb-reply"] #poe-chat-panel,
.poe-main[data-view="tools"] .poe-home__hero,
.poe-main[data-view="tools"] .poe-composer,
.poe-main[data-view="tools"] .poe-explore,
.poe-main[data-view="tools"] #poe-chat-panel,
.poe-main[data-view="account"] .poe-home__hero,
.poe-main[data-view="account"] .poe-composer,
.poe-main[data-view="account"] .poe-explore,
.poe-main[data-view="account"] #poe-chat-panel,
.poe-main[data-view="embed"] .poe-home__hero,
.poe-main[data-view="embed"] .poe-composer,
.poe-main[data-view="embed"] .poe-explore,
.poe-main[data-view="embed"] #poe-chat-panel {
  display: none !important;
}

.poe-main[data-view="member"] #poe-member-panel,
.poe-main[data-view="changelog"] #poe-changelog-panel,
.poe-main[data-view="translate"] #poe-translate-panel,
.poe-main[data-view="rpa"] #poe-rpa-panel,
.poe-main[data-view="fb-reply"] #poe-fbreply-panel,
.poe-main[data-view="tools"] #poe-tools-panel,
.poe-main[data-view="account"] #poe-account-panel,
.poe-main[data-view="embed"] #poe-embed-panel {
  display: block;
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
}

.poe-member-panel,
.poe-changelog-panel,
.poe-translate-panel,
.poe-rpa-panel,
.poe-fbreply-panel,
.poe-tools-panel,
.poe-account-panel,
.poe-embed-panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.poe-member-panel[hidden],
.poe-changelog-panel[hidden],
.poe-translate-panel[hidden],
.poe-rpa-panel[hidden],
.poe-fbreply-panel[hidden],
.poe-tools-panel[hidden],
.poe-account-panel[hidden],
.poe-embed-panel[hidden] {
  display: none !important;
}

/* 更新日志未读红点：无未读时必须隐藏（避免 display 覆盖 [hidden]） */
#poe-nav-changelog .poe-nav-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
#poe-nav-changelog .poe-nav-badge:not([hidden]) {
  display: inline-flex;
}
#poe-nav-changelog {
  display: flex;
  align-items: center;
}

.poe-member-inner,
.poe-translate-inner,
.poe-rpa-inner,
.poe-fbreply-inner,
.poe-tools-inner,
.poe-account-inner,
.poe-embed-inner {
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
}

.poe-rpa-inner .hero,
.poe-fbreply-inner .fb-lp-hero,
.poe-tools-inner .tool-hub-hero {
  padding-top: 8px;
}

/* Poe 侧栏内 instareply：768px 内容宽下单列排版，避免双栏挤压 */
.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-hero {
  padding: 24px 0 32px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-hero__grid {
  grid-template-columns: 1fr;
  gap: 24px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-hero__visual {
  order: -1;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-hero__copy {
  text-align: center;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-title {
  font-size: clamp(28px, 6vw, 36px);
  line-height: 1.18;
  text-wrap: balance;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-lead {
  margin: 0 auto 20px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.65;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-cta-wrap {
  margin-bottom: 14px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-cta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-install-item {
  flex: none;
  max-width: none;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-cta {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  padding: 13px 14px;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-store-hint {
  margin: 6px 0 0;
  font-size: 12px;
  max-width: none;
  text-align: center;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-trust {
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 12px;
  font-size: 13px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-social {
  justify-content: center;
  margin-bottom: 0;
  font-size: 13px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-visual-frame {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-hero-preview .fb-demo-scene-slot {
  min-height: 260px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-stats {
  padding: 22px 0;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-stats__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-stat__num {
  font-size: 20px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-stat__label {
  font-size: 12px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-demo {
  padding: 36px 0 28px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-demo__title {
  font-size: clamp(22px, 4vw, 28px);
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-demo__sub {
  margin-bottom: 22px;
  font-size: 14px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-steps {
  grid-template-columns: 1fr;
  gap: 12px;
}

.poe-fbreply-inner.preview-fb-ext-landing .fb-lp-step {
  padding: 16px 18px;
}

@media (max-width: 560px) {
  .poe-fbreply-inner.preview-fb-ext-landing .fb-lp-cta-row {
    grid-template-columns: 1fr;
  }
}

/* Poe 侧栏内 RPA：768px 内容宽下单列排版，避免双栏挤压 */
.poe-rpa-inner .hero {
  padding: 20px 0 24px;
}

.poe-rpa-inner .hero::after {
  display: none;
}

.poe-rpa-inner .hero-grid {
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

.poe-rpa-inner .hero-grid > .hero-card {
  order: -1;
}

.poe-rpa-inner .hero-grid > div:first-child {
  text-align: center;
}

.poe-rpa-inner .hero h1 {
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.2;
  margin: 14px 0 12px;
  text-wrap: balance;
  max-width: none;
}

.poe-rpa-inner .lead {
  margin: 0 auto;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.65;
}

.poe-rpa-inner .hero-card {
  padding: 16px;
  border-radius: 18px;
}

.poe-rpa-inner .process-list {
  gap: 8px;
}

.poe-rpa-inner .process-list li {
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.poe-rpa-inner .process-list b {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 13px;
}

.poe-rpa-inner .section {
  padding: 24px 0;
}

.poe-rpa-inner .section-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 14px;
}

.poe-rpa-inner .section-title {
  font-size: clamp(20px, 4vw, 26px);
}

.poe-rpa-inner .section-sub {
  font-size: 14px;
  max-width: 560px;
  margin-inline: auto;
}

.poe-rpa-inner .card-grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.poe-rpa-inner .card-grid--four .card {
  padding: 14px 16px;
  border-radius: 16px;
}

.poe-rpa-inner .card-grid--four .card h3 {
  font-size: 15px;
}

.poe-rpa-inner .card-grid--four .card p {
  font-size: 12px;
  line-height: 1.55;
}

.poe-rpa-inner .client-download-stack {
  margin-top: 16px;
}

.poe-rpa-inner .client-download-panel {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
}

.poe-rpa-inner .client-download-panel h3 {
  font-size: clamp(18px, 3vw, 22px);
}

.poe-rpa-inner .client-download-panel p {
  font-size: 13px;
}

.poe-rpa-inner .client-download-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.poe-rpa-inner .value-panel {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  text-align: center;
}

.poe-rpa-inner .cta-band .section-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.poe-rpa-inner .cta-band .section-actions {
  justify-content: center;
  width: 100%;
  margin-top: 12px;
}

.poe-rpa-inner .rpa-purchase-section {
  scroll-margin-top: 16px;
}

.poe-rpa-inner .rpa-purchase-card {
  margin-top: 8px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  border: 1px solid rgba(127, 127, 127, 0.22);
  background: rgba(127, 127, 127, 0.04);
}

.poe-rpa-inner .rpa-purchase-card .member-months-presets {
  margin: 12px 0 14px;
}

.poe-rpa-inner .rpa-purchase-card .member-simple-order-btn {
  width: 100%;
  max-width: 420px;
}

.poe-rpa-inner .rpa-purchase-card .member-redeem-hint {
  margin-top: 14px;
}

@media (max-width: 560px) {
  .poe-rpa-inner .card-grid--four,
  .poe-rpa-inner .client-download-actions {
    grid-template-columns: 1fr;
  }
}

.poe-account-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.poe-account-frame,
.poe-embed-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
}

.poe-embed-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.poe-embed-inner.is-models-guide-fit,
.poe-embed-panel.is-models-guide-fit .poe-embed-inner,
.poe-embed-inner.is-image-edit-fit,
.poe-embed-panel.is-image-edit-fit .poe-embed-inner {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.poe-embed-panel.is-models-guide-fit .poe-embed-frame[data-models-guide-fit="1"] {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.poe-embed-panel.is-image-edit-fit .poe-embed-frame {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

/* 画像素描：加宽内容列；可滚但不显示内层滚动条 */
.poe-app .poe-embed-panel.poe-embed-pixel-sketch .poe-embed-inner,
.poe-embed-inner.is-pixel-sketch-fit,
.poe-embed-panel.is-pixel-sketch-fit .poe-embed-inner {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: auto;
}

.poe-app .poe-embed-panel.poe-embed-pixel-sketch .poe-embed-inner::-webkit-scrollbar,
.poe-embed-inner.is-pixel-sketch-fit::-webkit-scrollbar,
.poe-embed-panel.is-pixel-sketch-fit .poe-embed-inner::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.poe-app .poe-embed-panel.poe-embed-pixel-sketch .poe-embed-frame,
.poe-app .poe-embed-panel.is-pixel-sketch-fit .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
  min-height: 0;
}

/* AI 改图片：与画像素描同宽 */
.poe-app .poe-embed-panel.poe-embed-image-edit-wide .poe-embed-frame,
.poe-app .poe-embed-panel.is-image-edit-fit.poe-embed-image-edit-wide .poe-embed-frame,
.poe-app .poe-embed-image-edit-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 模型列表：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-models-guide-wide .poe-embed-frame,
.poe-app .poe-embed-panel.is-models-guide-fit.poe-embed-models-guide-wide .poe-embed-frame,
.poe-app .poe-embed-models-guide-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 去水印：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-watermark-wide .poe-embed-frame,
.poe-app .poe-embed-watermark-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* UID 检测：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-uid-check-wide .poe-embed-frame,
.poe-app .poe-embed-uid-check-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* Maps 抓官网：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-maps-hub-wide .poe-embed-frame,
.poe-app .poe-embed-maps-hub-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 日本年号：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-wareki-wide .poe-embed-frame,
.poe-app .poe-embed-wareki-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 假名转换：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-kana-wide .poe-embed-frame,
.poe-app .poe-embed-kana-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 日本邮编：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-postal-code-wide .poe-embed-frame,
.poe-app .poe-embed-postal-code-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 日本节假日：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-japan-holidays-wide .poe-embed-frame,
.poe-app .poe-embed-japan-holidays-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 计算器：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-calculator-wide .poe-embed-frame,
.poe-app .poe-embed-calculator-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 复利计算器：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-compound-wide .poe-embed-frame,
.poe-app .poe-embed-compound-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 汇率换算：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-fx-wide .poe-embed-frame,
.poe-app .poe-embed-fx-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 遗产税：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-inheritance-wide .poe-embed-frame,
.poe-app .poe-embed-inheritance-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 秒合约：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-second-contract-wide .poe-embed-frame,
.poe-app .poe-embed-second-contract-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 2FA：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-twofa-wide .poe-embed-frame,
.poe-app .poe-embed-twofa-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 临时邮箱：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-temp-mail-wide .poe-embed-frame,
.poe-app .poe-embed-temp-mail-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

/* 降龙十八掌下载页：与画像素描同宽 1180 */
.poe-app .poe-embed-panel.poe-embed-xianglong18-wide .poe-embed-frame,
.poe-app .poe-embed-xianglong18-wide .poe-embed-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

.poe-embed-panel.is-pixel-sketch-fit .poe-embed-frame {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

/* 内测面板定高：外层不滚，滚动只在 iframe 内（隐藏滚动条） */
.poe-app .poe-embed-panel.is-pixel-sketch-panel-fill .poe-embed-inner,
.poe-embed-inner.is-pixel-sketch-panel-fill {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.poe-app .poe-embed-panel.is-pixel-sketch-panel-fill .poe-embed-frame,
.poe-embed-panel.is-pixel-sketch-panel-fill .poe-embed-frame {
  flex: 1 1 auto !important;
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
  min-height: 0 !important;
  overflow: hidden;
}

html.preview-embed-mode .preview-nav,
html.preview-embed-mode nav.preview-nav {
  display: none !important;
}

html.preview-embed-mode .tool-hero {
  padding-top: 12px;
}

.poe-account-inner.is-guest .poe-account-frame {
  background: transparent;
}

html.preview-embed-mode .preview-auth-body {
  background: transparent !important;
}

html.preview-embed-mode,
html.preview-embed-mode body.preview-auth-body {
  height: 100%;
  min-height: 100%;
}

html.preview-embed-mode .preview-auth-main {
  box-sizing: border-box;
  min-height: 100%;
  min-height: 100dvh;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

html.preview-embed-mode body.user-center-page .uc-wrap {
  margin-top: 0 !important;
}

html.preview-embed-mode body.user-center-page.uc-embed {
  height: 100%;
  overflow: hidden;
}

/* 用户中心嵌入：与画像素描同宽 1180 */
html.preview-embed-mode body.user-center-page.uc-embed .uc-wrap {
  max-width: min(1180px, 100%) !important;
  margin: 0 auto !important;
  padding: 12px 16px 28px !important;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.poe-app .poe-account-panel .poe-account-frame,
.poe-app .poe-account-frame {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
}

.poe-tools-inner[data-preview-tool="tools-hub"] .tool-hub-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.poe-translate-inner .section--tight {
  padding-top: 8px;
}

.poe-translate-inner .translate-workbench__bar {
  position: relative;
}

.poe-translate-inner .translate-history-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 138, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 247, 0.92));
  color: #c2186a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.poe-translate-inner .tht-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
}

.poe-translate-inner .tht-layer[hidden] {
  display: none;
}

.poe-translate-inner .tht-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.poe-translate-inner .tht-sheet {
  position: relative;
  width: min(440px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.poe-translate-inner .tht-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.poe-translate-inner .tht-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}

.poe-translate-inner .tht-empty {
  text-align: center;
  color: #94a3b8;
  padding: 48px 12px;
  font-size: 14px;
}

.poe-translate-inner .tht-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 12px 13px;
  margin-bottom: 12px;
  background: #fcfcfd;
}

.poe-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 241, 247, 0.96));
  backdrop-filter: blur(10px);
}

.poe-panel-head h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.poe-panel-head__menu {
  display: none;
  position: absolute;
  left: 12px;
}

/* Poe 侧栏页：统一内容列宽（与聊天输入框 768px 对齐；语境翻译保持原宽） */
.poe-app .poe-fbreply-inner .preview-shell,
.poe-app .poe-tools-inner .preview-shell {
  width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  max-width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  margin-inline: auto;
  box-sizing: border-box;
}

/* 余额充值 / 会员方案：与画像素描同宽 1180 */
.poe-app .poe-member-inner .preview-shell {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
  box-sizing: border-box;
}

/* 极域 RPA：与画像素描同宽 1180 */
.poe-app .poe-rpa-inner .preview-shell {
  width: min(1180px, calc(100% - 20px));
  max-width: min(1180px, calc(100% - 20px));
  margin-inline: auto;
  box-sizing: border-box;
}

.poe-app .poe-translate-inner .preview-shell {
  width: min(1240px, calc(100% - 24px));
  max-width: none;
  margin-inline: auto;
  box-sizing: border-box;
}

/* Poe 侧栏占 300px：viewport 仍较宽但内容区已不足以舒适双栏时提前单列 */
@media (max-width: 1080px) {
  .poe-app .translate-dual {
    grid-template-columns: 1fr;
  }

  .poe-app .translate-pane {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
  }
}

.poe-app .poe-account-frame,
.poe-app .poe-embed-frame {
  width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  max-width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  margin-inline: auto;
}

.poe-member-inner .hero--embed {
  padding-top: 20px;
  padding-bottom: 8px;
}

.poe-member-inner--simple .member-simple-wrap {
  margin: 0 auto;
  padding: 14px 16px 28px;
}

.poe-member-inner--simple .member-simple-lead {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.poe-member-inner--simple .member-simple-grid {
  gap: 10px;
}

.poe-member-inner--simple .price-card {
  padding: 16px;
  border-radius: 18px;
}

.poe-member-inner--simple .price-card h3 {
  font-size: 15px;
}

.poe-member-inner--simple .price {
  margin-top: 4px;
  font-size: 28px;
}

.poe-member-inner--simple .price-card__tagline {
  margin: 8px 0 0;
  min-height: 2.6em;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

.poe-member-inner--simple .price-card .btn-pick-tier {
  margin-top: 12px;
  padding: 9px 12px;
  font-size: 13px;
}

.poe-member-inner--simple .member-simple-checkout {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.poe-member-inner--simple .member-simple-order-btn {
  width: 100%;
  margin-top: 14px;
}

.member-months-block {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(236, 72, 153, 0.16);
  background: linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.member-months-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.member-months-block__label {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.member-months-block__hint {
  font-size: 12px;
  color: var(--muted);
}

.member-months-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.member-months-preset {
  padding: 10px 6px;
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 12px;
  background: #fff;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.member-months-preset:hover {
  border-color: rgba(236, 72, 153, 0.35);
  color: #be185d;
}

.member-months-preset.is-active {
  border-color: #ec4899;
  background: linear-gradient(180deg, #fff1f7, #fff);
  color: #be185d;
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.12);
  transform: translateY(-1px);
}

.member-months-stepper {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: stretch;
}

.member-months-step {
  display: grid;
  place-items: center;
  min-height: 64px;
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 16px;
  background: #fff;
  color: #be185d;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.member-months-step:hover {
  background: #fff7fb;
  border-color: rgba(236, 72, 153, 0.4);
}

.member-months-value-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 0 12px;
  border: 1px solid rgba(236, 72, 153, 0.22);
  border-radius: 16px;
  background: #fff;
}

.member-months-value-wrap input {
  width: 2.6em;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(34px, 6vw, 42px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.member-months-value-wrap input::-webkit-outer-spin-button,
.member-months-value-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.member-months-value-wrap input:focus {
  outline: none;
}

.member-months-unit {
  margin-top: 10px;
  color: #6b7280;
  font-size: 16px;
  font-weight: 700;
}

.member-months-estimate {
  display: none;
}

@media (max-width: 560px) {
  .member-months-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.poe-member-inner--simple .member-redeem-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
}

/* 会员支付卡片 — 与简版会员页统一 */
.poe-member-inner--simple .member-payment-card--modern {
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(255, 251, 247, 0.98) 0%, rgba(255, 255, 255, 0.96) 48%, rgba(255, 241, 247, 0.92) 100%);
  box-shadow: 0 12px 36px rgba(236, 72, 153, 0.08);
}

.member-payment-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.member-payment-card__eyebrow {
  margin: 0;
  color: #be185d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.member-payment-card__order {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.member-payment-card__order strong {
  color: var(--ink);
  font-weight: 700;
}

.member-payment-card__chain {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.1);
  color: #be185d;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.member-payment-amount {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.55));
  text-align: center;
}

.member-payment-amount__label {
  display: block;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}

.member-payment-amount__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 12px;
}

.member-payment-amount__value strong {
  color: #b45309;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.member-payment-amount__value span {
  color: #b45309;
  font-size: 15px;
  font-weight: 800;
}

.member-payment-amount__copy {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
}

.member-pay-address-panel {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(236, 72, 153, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.member-pay-address-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.member-pay-address-panel__head > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.member-pay-address-panel__copy {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #be185d;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.member-pay-address-panel__copy:hover {
  background: #fff1f7;
  border-color: rgba(236, 72, 153, 0.45);
}

.member-pay-address-panel__body {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf4 0%, #fff 100%);
  border: 1px dashed rgba(236, 72, 153, 0.28);
  cursor: pointer;
  text-align: center;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.member-pay-address-panel__body:hover {
  background: #fff7fb;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}

.member-pay-address-panel__body:focus-visible {
  outline: none;
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.14);
}

.member-pay-address-panel__body textarea {
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.02em;
  text-align: center;
  resize: none;
  word-break: break-all;
  outline: none;
  pointer-events: none;
  cursor: pointer;
}

.member-pay-address-panel__tap-hint {
  display: block;
  margin-top: 10px;
  color: #be185d;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

.member-pay-address-panel__tip {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.5;
}

.member-pay-address-panel__tip strong {
  color: #be185d;
}

.member-tx-box--modern {
  display: grid;
  gap: 8px;
}

.member-tx-box--modern span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.member-tx-box--modern input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(236, 72, 153, 0.16);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.member-tx-box--modern input:focus {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.member-payment-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

.poe-member-inner--simple .member-selected-tier {
  margin-top: 0;
}

@media (max-width: 860px) {
  .poe-member-inner--simple .price-grid--triple {
    grid-template-columns: 1fr;
  }
}

.poe-member-inner .hero--embed h1 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.poe-sidebar__links a.is-active {
  color: #be185d;
  background: #fff1f7;
  font-weight: 700;
}

#poe-chat-panel[hidden] {
  display: none !important;
}

.poe-home__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 16px;
}

.poe-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.poe-logo__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.poe-logo__text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.poe-mode-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 520px;
}

.poe-mode-pill {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.poe-mode-pill.active {
  border-color: rgba(236, 72, 153, 0.35);
  background: #fff1f7;
  color: #be185d;
}

.poe-explore {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 20px 12px;
}

.poe-explore-grid {
  display: grid;
  grid-template-columns: repeat(10, 76px);
  justify-content: center;
  gap: 8px 10px;
  padding: 2px 0 4px;
}

@media (max-width: 920px) {
  .poe-explore-grid {
    grid-template-columns: repeat(8, 76px);
  }
}

@media (max-width: 640px) {
  .poe-explore-grid {
    grid-template-columns: repeat(5, 76px);
  }
}

.poe-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.poe-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.poe-chat-body .chat-window {
  flex: 1 1 auto;
  min-height: 0;
}

.poe-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.poe-chat-head__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poe-chat-head__bot {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.poe-chat-head__more {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.poe-chat-head__more:hover {
  background: rgba(236, 72, 153, 0.08);
  color: #be185d;
}

.poe-chat-more-menu {
  position: fixed;
  z-index: 120;
  min-width: 160px;
  padding: 6px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14);
}

.poe-chat-more-menu__item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.poe-chat-more-menu__item:hover {
  background: rgba(236, 72, 153, 0.08);
}

.poe-chat-more-menu__item--danger {
  color: #dc2626;
}

.poe-chat-more-menu__item--danger:hover {
  background: rgba(254, 226, 226, 0.85);
}

.poe-bot-row {
  margin-bottom: 22px;
}

.poe-bot-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.poe-bot-row__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.poe-bot-row__all {
  color: #be185d;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.poe-bot-row__all:hover {
  text-decoration: underline;
}

.poe-bot-row__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.poe-bot-row__track::-webkit-scrollbar {
  height: 6px;
}

.poe-bot-row__track::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.22);
  border-radius: 999px;
}

.poe-bot-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 92px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  scroll-snap-align: start;
}

.poe-bot-card__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(84, 54, 25, 0.14);
  transition: transform 0.15s ease;
}

.poe-bot-card__svg {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
}

.poe-bot-card__svg--fill {
  width: 32px;
  height: 32px;
}

.poe-bot-card:hover .poe-bot-card__icon {
  transform: translateY(-2px) scale(1.03);
}

.poe-bot-card__badge {
  position: absolute;
  margin-top: -78px;
  margin-left: 52px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.poe-bot-card {
  position: relative;
}

.poe-bot-card__name {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.poe-chat-head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.chat-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-head-main h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poe-sidebar__auth .preview-nav-auth__btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-sizing: border-box;
  box-shadow: none;
  transform: none;
}

.poe-sidebar__auth .preview-nav-auth__btn:hover {
  transform: none;
}

/* 日间已登录：弱化成次级按钮，避免底部一块高饱和渐变抢视觉 */
.poe-sidebar__auth[data-auth-state="in"] .preview-nav-auth__btn--primary {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(84, 54, 25, 0.12);
}

.poe-sidebar__auth[data-auth-state="in"] .preview-nav-auth__btn--primary:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(236, 72, 153, 0.28);
  color: #9d174d;
}

/* 未登录「登录」仍保留强调色 */
.poe-sidebar__auth[data-auth-state="out"] .preview-nav-auth__btn--primary,
.poe-sidebar__auth:not([data-auth-state]) .preview-nav-auth__btn--primary {
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
  border: 0;
}

.poe-sidebar__auth .preview-nav-auth__btn--outline {
  border: 1px solid rgba(84, 54, 25, 0.12);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.poe-composer {
  flex: 0 0 auto;
  width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  max-width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  margin: 0 auto;
  padding: 8px var(--poe-content-gutter) 14px;
  background: transparent !important;
  border-top: 0 !important;
  box-sizing: border-box;
}

/* 内测：Dify 借鉴 UX（反馈 / 追问 / 引用 / 续传） */
.dify-fb-btn.is-done { color: #2563eb; }
.dify-suggest {
  margin: 8px 0 0;
  padding: 0 2px;
}
.dify-suggest__label {
  font-size: 12px;
  color: rgba(90, 98, 120, 0.85);
  margin-bottom: 6px;
}
.dify-suggest__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dify-suggest__btn {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.dify-suggest__btn:hover { background: rgba(37, 99, 235, 0.12); }
.dify-citations {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 12px;
  line-height: 1.45;
  color: #4b5563;
}
.dify-citations strong { display: block; margin-bottom: 4px; color: #374151; }
.dify-citations ul { margin: 0; padding-left: 1.1em; }
.dify-citations li { margin: 3px 0; }
.dify-citations em { font-style: normal; color: #111827; }
.dify-resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-size: 12px;
}
.dify-resume-bar__btn {
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: #d97706;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
html.theme-night .dify-suggest__label { color: rgba(210, 216, 230, 0.72); }
html.theme-night .dify-suggest__btn {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.28);
  color: #93c5fd;
}
html.theme-night .dify-citations {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}
html.theme-night .dify-citations strong,
html.theme-night .dify-citations em { color: #e5e7eb; }

/* 内测：AI SDK 模式步骤状态（联网/分块/降级） */
.poe-stream-status {
  margin: 6px 4px 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(90, 98, 120, 0.88);
  min-height: 0;
}
html.theme-night .poe-stream-status {
  color: rgba(210, 216, 230, 0.72);
}
.msg-usage-pill--steps,
.msg-usage-pill--ms {
  opacity: 0.85;
}

.poe-main[data-view="chat"] .poe-composer {
  padding-bottom: 16px;
  border-top: 0 !important;
  background: transparent !important;
  backdrop-filter: none;
}

.poe-composer__tool {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.poe-composer__tool:hover {
  background: rgba(236, 72, 153, 0.08);
  color: #be185d;
}

.poe-composer__tool.is-done {
  color: #16a34a;
}

.poe-composer__tool[hidden] {
  display: none !important;
}

.poe-composer__box {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(84, 54, 25, 0.08);
}

/* Production: keep legacy single-row composer from split markup */
.poe-app:not(.staging-composer-poe) .poe-composer__box {
  flex-direction: row;
  flex-wrap: nowrap;
}

.poe-app:not(.staging-composer-poe) .poe-composer__bar,
.poe-app:not(.staging-composer-poe) .poe-composer__bar-left,
.poe-app:not(.staging-composer-poe) .poe-composer__bar-right {
  display: contents;
}

.poe-app:not(.staging-composer-poe) .poe-composer__input-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  order: 2;
}

.poe-app:not(.staging-composer-poe) #poe-composer-attach {
  order: 1;
}

.poe-app:not(.staging-composer-poe) #poe-composer-clear-context {
  order: 3;
}

.poe-app:not(.staging-composer-poe) .poe-composer__model-wrap {
  order: 4;
}

.poe-app:not(.staging-composer-poe) #poe-composer-send {
  order: 5;
}

.poe-app:not(.staging-composer-poe) .poe-composer__staging-tool,
.poe-app:not(.staging-composer-poe) .poe-composer__send-icon--up {
  display: none !important;
}

.poe-app:not(.staging-composer-poe) .poe-composer__phrases-tool,
body:not(.staging-quick-phrases) .poe-composer__phrases-tool,
body:not(.staging-quick-phrases) .poe-composer-phrases {
  display: none !important;
}

body:not(.staging-reasoning-effort) .poe-composer__reasoning-tool,
body:not(.staging-reasoning-effort) .poe-composer-reasoning-menu {
  display: none !important;
}

.poe-composer__reasoning-glyph {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

.poe-composer__reasoning-bulb {
  display: block;
  color: #10b981;
}

.poe-composer__reasoning-q {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  line-height: 1;
  margin-top: -1px;
}

.poe-composer-reasoning-menu {
  position: fixed;
  z-index: 140;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 24px));
  min-width: 0;
  max-width: calc(100vw - 24px);
  max-height: min(360px, calc(100vh - 24px));
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.poe-composer-reasoning-menu[hidden] {
  display: none !important;
}

.poe-composer-reasoning-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.poe-composer-reasoning-menu__item + .poe-composer-reasoning-menu__item {
  margin-top: 2px;
}

.poe-composer-reasoning-menu__item:hover {
  background: rgba(148, 163, 184, 0.14);
}

.poe-composer-reasoning-menu__item.is-active {
  background: #dcfce7;
}

.poe-composer-reasoning-menu__left,
.poe-composer-reasoning-menu__right {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.poe-composer-reasoning-menu__left {
  flex: 0 0 auto;
  gap: 8px;
}

.poe-composer-reasoning-menu__right {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 8px;
}

.poe-composer-reasoning-menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #64748b;
  flex: 0 0 auto;
}

.poe-composer-reasoning-menu__item.is-active .poe-composer-reasoning-menu__icon {
  color: #16a34a;
}

.poe-composer-reasoning-menu__label {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #1f2937;
  white-space: nowrap;
}

.poe-composer-reasoning-menu__item.is-active .poe-composer-reasoning-menu__label {
  color: #166534;
}

.poe-composer-reasoning-menu__hint {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #9ca3af;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.poe-composer-reasoning-menu__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #16a34a;
}

html.theme-night .poe-composer-reasoning-menu {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.55);
}

html.theme-night .poe-composer-reasoning-menu__item:hover {
  background: rgba(148, 163, 184, 0.14);
}

html.theme-night .poe-composer-reasoning-menu__item.is-active {
  background: rgba(22, 163, 74, 0.22);
}

html.theme-night .poe-composer-reasoning-menu__icon {
  color: #94a3b8;
}

html.theme-night .poe-composer-reasoning-menu__item.is-active .poe-composer-reasoning-menu__icon,
html.theme-night .poe-composer-reasoning-menu__check {
  color: #4ade80;
}

html.theme-night .poe-composer-reasoning-menu__label {
  color: #f1f5f9;
}

html.theme-night .poe-composer-reasoning-menu__item.is-active .poe-composer-reasoning-menu__label {
  color: #bbf7d0;
}

html.theme-night .poe-composer-reasoning-menu__hint {
  color: #94a3b8;
}

@media (max-width: 420px) {
  .poe-composer-reasoning-menu__item {
    align-items: flex-start;
    gap: 10px;
  }

  .poe-composer-reasoning-menu__right {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .poe-composer-reasoning-menu__hint {
    white-space: normal;
    text-align: right;
  }
}

.poe-app.staging-composer-poe .poe-composer__reasoning-tool {
  width: auto;
  min-width: 28px;
  padding: 0 4px;
}

.poe-app.staging-composer-poe .poe-composer__reasoning-tool.is-active .poe-composer__reasoning-bulb,
.poe-app.staging-composer-poe .poe-composer__reasoning-tool.is-active .poe-composer__reasoning-q {
  color: #059669;
}

html.theme-night .poe-composer__reasoning-bulb,
html.theme-night .poe-composer__reasoning-q {
  color: #34d399;
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__reasoning-tool.is-active .poe-composer__reasoning-bulb,
html.theme-night .poe-app.staging-composer-poe .poe-composer__reasoning-tool.is-active .poe-composer__reasoning-q {
  color: #6ee7b7;
}

/* Staging only: custom-prompt icon uses tune/sliders instead of lightbulb */
.poe-composer__prompt-icon--staging {
  display: none !important;
}

body.staging-quick-phrases .poe-composer__prompt-icon--default {
  display: none !important;
}

body.staging-quick-phrases .poe-composer__prompt-icon--staging {
  display: block !important;
}

/* Staging only: clear-context uses eraser icon after phrases */
.poe-composer__clear-icon--staging {
  display: none !important;
}

body.staging-composer-tips .poe-composer__clear-icon--default {
  display: none !important;
}

body.staging-composer-tips .poe-composer__clear-icon--staging {
  display: block !important;
}

body:not(.staging-composer-tips) .poe-composer__clear-messages {
  display: none !important;
}

/* Staging only: fast tooltips above composer tools */
.poe-composer-tip {
  position: fixed;
  z-index: 220;
  max-width: min(240px, calc(100vw - 24px));
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  transform: translateY(0);
}

.poe-composer-tip[hidden] {
  display: none !important;
}

.poe-composer-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: rgba(15, 23, 42, 0.92);
}

.poe-composer-tip.is-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(15, 23, 42, 0.92);
}

body:not(.staging-composer-tips) .poe-composer-tip {
  display: none !important;
}

.poe-composer__input-wrap {
  flex: 1;
  min-width: 0;
}

.poe-composer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.poe-composer__bar-left,
.poe-composer__bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.poe-composer__bar-right {
  flex: 0 0 auto;
}

.poe-composer__send-icon--up {
  display: none;
}

.poe-composer__translate-glyph {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.poe-composer__model-wrap {
  flex: 0 0 auto;
}

.poe-composer__model {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  height: 32px;
  padding: 0 8px 0 6px;
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #fff7fb);
  color: #9d174d;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.poe-composer__model:hover {
  border-color: rgba(236, 72, 153, 0.32);
  background: #fff1f7;
}

.poe-composer__model-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899, #f97316);
}

.poe-composer__model-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.poe-composer__model-chevron {
  flex: 0 0 auto;
  opacity: 0.55;
}

.poe-composer-model-menu {
  position: fixed;
  z-index: 130;
  min-width: 220px;
  max-width: min(300px, calc(100vw - 24px));
  max-height: min(268px, calc(100vh - 24px));
  padding: 6px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

html.jiyu-stg-frontend .poe-composer-model-menu {
  max-height: min(520px, calc(100vh - 24px));
  min-width: 240px;
}

.poe-composer-model-menu[hidden] {
  display: none !important;
}

/* Staging only: quick phrases popover */
.poe-composer-phrases {
  position: fixed;
  z-index: 131;
  width: min(340px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.16);
  overflow: hidden;
  overscroll-behavior: contain;
}

.poe-composer-phrases[hidden] {
  display: none !important;
}

.poe-composer-phrases__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.poe-composer-phrases__head strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.poe-composer-phrases__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.poe-composer-phrases__close:hover {
  background: rgba(148, 163, 184, 0.16);
  color: #0f172a;
}

.poe-composer-phrases__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.poe-composer-phrases__list[hidden] {
  display: none !important;
}

.poe-composer-phrases__empty {
  padding: 12px 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.poe-composer-phrases__item {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 4px;
  border-radius: 12px;
}

.poe-composer-phrases__item:hover {
  background: rgba(241, 245, 249, 0.9);
}

.poe-composer-phrases__use {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 10px 10px 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.poe-composer-phrases__use-title {
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poe-composer-phrases__use-sub {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poe-composer-phrases__item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
}

.poe-composer-phrases__icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.poe-composer-phrases__icon-btn:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
}

.poe-composer-phrases__form {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.poe-composer-phrases__form[hidden] {
  display: none !important;
}

.poe-composer-phrases__form input,
.poe-composer-phrases__form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  resize: vertical;
}

.poe-composer-phrases__form textarea {
  min-height: 64px;
  max-height: 120px;
}

.poe-composer-phrases__form input:focus,
.poe-composer-phrases__form textarea:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.poe-composer-phrases__form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.poe-composer-phrases__btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.poe-composer-phrases__btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.35);
  color: #475569;
}

.poe-composer-phrases__btn--primary {
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
}

.poe-composer-phrases__foot {
  flex: 0 0 auto;
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.poe-composer-phrases__foot[hidden] {
  display: none !important;
}

.poe-composer-phrases__add {
  width: 100%;
  height: 36px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.poe-composer-phrases__add:hover {
  border-color: rgba(236, 72, 153, 0.4);
  color: #9d174d;
  background: #fff7fb;
}

html.theme-night .poe-composer-phrases {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.55);
}

html.theme-night .poe-composer-phrases__head {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

html.theme-night .poe-composer-phrases__head strong,
html.theme-night .poe-composer-phrases__use-title {
  color: #f1f5f9;
}

html.theme-night .poe-composer-phrases__close,
html.theme-night .poe-composer-phrases__use-sub,
html.theme-night .poe-composer-phrases__empty,
html.theme-night .poe-composer-phrases__icon-btn {
  color: #94a3b8;
}

html.theme-night .poe-composer-phrases__item:hover {
  background: rgba(51, 65, 85, 0.7);
}

html.theme-night .poe-composer-phrases__close:hover,
html.theme-night .poe-composer-phrases__icon-btn:hover {
  background: rgba(71, 85, 105, 0.55);
  color: #e2e8f0;
}

html.theme-night .poe-composer-phrases__form,
html.theme-night .poe-composer-phrases__foot {
  border-top-color: rgba(148, 163, 184, 0.18);
}

html.theme-night .poe-composer-phrases__form input,
html.theme-night .poe-composer-phrases__form textarea {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
}

html.theme-night .poe-composer-phrases__btn--ghost {
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

html.theme-night .poe-composer-phrases__add {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

html.theme-night .poe-composer-phrases__add:hover {
  border-color: rgba(244, 114, 182, 0.45);
  color: #f9a8d4;
  background: rgba(76, 5, 45, 0.35);
}

/* Staging only: centered delete confirm for quick phrases */
.poe-phrases-confirm {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.poe-phrases-confirm[hidden] {
  display: none !important;
}

.poe-phrases-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.poe-phrases-confirm__panel {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 48px));
  padding: 22px 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.poe-phrases-confirm__panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 750;
  color: #0f172a;
}

.poe-phrases-confirm__text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
}

.poe-phrases-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.poe-phrases-confirm__btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.poe-phrases-confirm__btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: #475569;
}

.poe-phrases-confirm__btn--ghost:hover {
  background: rgba(148, 163, 184, 0.12);
}

.poe-phrases-confirm__btn--danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
}

.poe-phrases-confirm__btn--danger:hover {
  filter: brightness(1.04);
}

html.theme-night .poe-phrases-confirm__backdrop {
  background: rgba(2, 6, 23, 0.62);
}

html.theme-night .poe-phrases-confirm__panel {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

html.theme-night .poe-phrases-confirm__panel h2 {
  color: #f8fafc;
}

html.theme-night .poe-phrases-confirm__text {
  color: #94a3b8;
}

html.theme-night .poe-phrases-confirm__btn--ghost {
  border-color: rgba(148, 163, 184, 0.32);
  color: #cbd5e1;
}

body:not(.staging-quick-phrases) .poe-phrases-confirm {
  display: none !important;
}

/* Message delete confirm (rich chat UI: staging + production) */
.poe-msg-delete-confirm {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.poe-msg-delete-confirm[hidden] {
  display: none !important;
}

.poe-msg-delete-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.poe-msg-delete-confirm__panel {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 48px));
  padding: 22px 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.poe-msg-delete-confirm__panel h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 750;
  color: #0f172a;
}

.poe-msg-delete-confirm__text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
}

.poe-msg-delete-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.poe-msg-delete-confirm__btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.poe-msg-delete-confirm__btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: #475569;
}

.poe-msg-delete-confirm__btn--ghost:hover {
  background: rgba(148, 163, 184, 0.12);
}

.poe-msg-delete-confirm__btn--danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
}

.poe-msg-delete-confirm__btn--danger:hover {
  filter: brightness(1.04);
}

html.theme-night .poe-msg-delete-confirm__backdrop {
  background: rgba(2, 6, 23, 0.62);
}

html.theme-night .poe-msg-delete-confirm__panel {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

html.theme-night .poe-msg-delete-confirm__panel h2 {
  color: #f8fafc;
}

html.theme-night .poe-msg-delete-confirm__text {
  color: #94a3b8;
}

html.theme-night .poe-msg-delete-confirm__btn--ghost {
  border-color: rgba(148, 163, 184, 0.32);
  color: #cbd5e1;
}

.poe-composer-model-menu__item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.poe-composer-model-menu__item:hover {
  background: rgba(236, 72, 153, 0.08);
}

.poe-composer-model-menu__item.is-active {
  background: #fff1f7;
}

.poe-composer-model-menu__label {
  font-size: 13px;
  font-weight: 800;
}

.poe-composer-model-menu__note {
  font-size: 11px;
  color: var(--muted);
}

.poe-composer-model-menu__item.is-active .poe-composer-model-menu__label {
  color: #be185d;
}

.poe-composer-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 18px 22px;
  margin-top: 14px;
  padding: 0 2px;
}

.poe-composer-quick[hidden] {
  display: none !important;
}

.poe-composer-quick__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.poe-composer-quick__item:hover {
  color: var(--ink);
}

.poe-composer-quick__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(84, 54, 25, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.poe-composer-quick__item:hover .poe-composer-quick__icon {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.16);
}

.poe-composer-quick__icon svg {
  width: 22px;
  height: 22px;
}

.poe-composer-quick__icon .poe-bot-card__svg--fill {
  width: 20px;
  height: 20px;
}

.poe-composer-quick__label {
  max-width: 84px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poe-composer__box textarea {
  flex: 1;
  min-width: 0;
  min-height: 24px !important;
  max-height: 200px !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--ink);
  resize: none !important;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
}

.poe-composer__box textarea:focus {
  border: 0 !important;
  box-shadow: none !important;
}

.poe-composer__box textarea::placeholder {
  color: var(--muted);
}

.poe-composer__send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.28);
}

.poe-composer__send:hover:not(:disabled) {
  filter: brightness(1.06);
}

.poe-composer__send:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.poe-mobile-menu,
.poe-sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

body.poe-sidebar-open {
  overflow: hidden;
}

.poe-sidebar-backdrop {
  display: none;
}

@media (max-width: 960px) {
  .poe-sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(23, 32, 51, 0.28);
    cursor: pointer;
  }
}

/* Poe 布局内沿用极域聊天气泡样式 */
.poe-app .composer,
.poe-app .poe-composer.composer {
  background: transparent !important;
}

.poe-app .chat-window {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  max-width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  margin: 0 auto;
  padding: 20px 0 12px;
  background: transparent;
}

.poe-app .message {
  margin-bottom: 22px;
}

.poe-app .message.ai {
  justify-content: flex-start;
}

.poe-app .message.user {
  justify-content: flex-end;
}

.poe-app .message.user .message-body--user {
  max-width: min(calc(var(--poe-content-width) * 0.88), 100%);
  justify-items: end;
}

.poe-app .message.ai .message-body--ai {
  max-width: 100%;
}

.poe-app .message-assistant-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.poe-app .message-assistant-head__avatar {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.poe-app .message-assistant-head__name {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.poe-app .message.user .bubble {
  padding: 10px 14px;
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.22);
}

.poe-app .message.ai .bubble.ai-rich {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.poe-app .message-tools {
  gap: 2px;
  opacity: 0;
  transform: none;
  margin-top: 2px;
}

.poe-app .message:hover .message-tools,
.poe-app .message:focus-within .message-tools {
  opacity: 1;
}

.poe-app .message-tool--icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  box-shadow: none;
}

.poe-app .message-tool--icon:hover {
  background: rgba(236, 72, 153, 0.08);
  color: #be185d;
}

/* Staging-only delete control (button only rendered on jiyunc.com) */
.poe-app .message-tool--icon[data-action="delete"]:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.poe-app .message-tool--icon.is-done {
  color: #16a34a;
}

.poe-app .message-tool--text {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.poe-app .message-tool--text.is-done {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(240, 253, 244, 0.92);
}

/* Staging only: floating tip for message icon tools (copy / retry / vault …) */
#poe-msg-tool-tip {
  position: fixed;
  z-index: 12000;
  padding: 5px 9px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

#poe-msg-tool-tip.is-on {
  opacity: 1;
  transform: translateY(0);
}

html.theme-night #poe-msg-tool-tip {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* Staging only: Poe-style message timestamps (body.staging-chat-timestamps) */
.poe-app.staging-chat-timestamps .chat-day-sep {
  display: flex;
  justify-content: center;
  margin: 6px 0 16px;
}

.poe-app.staging-chat-timestamps .chat-day-sep span {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  background: rgba(17, 24, 39, 0.06);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.poe-app.staging-chat-timestamps .message.user .bubble {
  position: relative;
  padding-bottom: 22px;
  padding-right: 14px;
}

.poe-app.staging-chat-timestamps .message.user .msg-time {
  position: absolute;
  right: 12px;
  bottom: 7px;
  font-size: 11px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
}

.poe-app.staging-chat-timestamps .message.ai .bubble .msg-time {
  display: block;
  text-align: right;
  margin-top: 8px;
  padding-right: 2px;
  font-size: 11px;
  line-height: 1;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.poe-app.staging-chat-timestamps .msg-sent {
  margin-left: 2px;
  font-size: 10px;
  opacity: 0.9;
}

html.theme-night .poe-app.staging-chat-timestamps .chat-day-sep span {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}

html.theme-night .poe-app.staging-chat-timestamps .message.ai .bubble .msg-time {
  color: #94a3b8;
}

/* Chat bubble footer: model pill (prod+staging); tokens only when staging-chat-usage */
.poe-app.staging-composer-poe .message.ai .bubble .msg-meta,
.poe-app.staging-chat-usage .message.ai .bubble .msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.poe-app.staging-composer-poe .msg-usage-pills,
.poe-app.staging-chat-usage .msg-usage-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.poe-app.staging-composer-poe .msg-usage-pill,
.poe-app.staging-chat-usage .msg-usage-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(248, 250, 252, 0.92);
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.poe-app.staging-chat-usage .msg-usage-pill--charge {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 251, 235, 0.9);
}

.poe-app.staging-composer-poe .msg-usage-pill--model,
.poe-app.staging-chat-usage .msg-usage-pill--model {
  color: #475569;
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(241, 245, 249, 0.95);
  font-weight: 600;
}

.poe-app.staging-composer-poe.staging-chat-timestamps .message.ai .bubble .msg-meta .msg-time,
.poe-app.staging-chat-usage.staging-chat-timestamps .message.ai .bubble .msg-meta .msg-time {
  display: block;
  margin-top: 0;
  margin-left: auto;
  text-align: right;
  padding-right: 2px;
  font-size: 11px;
  line-height: 1;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

html.theme-night .poe-app.staging-composer-poe .msg-usage-pill,
html.theme-night .poe-app.staging-chat-usage .msg-usage-pill {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

html.theme-night .poe-app.staging-chat-usage .msg-usage-pill--charge {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(120, 53, 15, 0.28);
}

html.theme-night .poe-app.staging-composer-poe .msg-usage-pill--model,
html.theme-night .poe-app.staging-chat-usage .msg-usage-pill--model {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.7);
}

html.theme-night .poe-app.staging-composer-poe.staging-chat-timestamps .message.ai .bubble .msg-meta .msg-time,
html.theme-night .poe-app.staging-chat-usage.staging-chat-timestamps .message.ai .bubble .msg-meta .msg-time {
  color: #94a3b8;
}

/* Staging only: Poe-style split composer (textarea top, toolbar bottom) */
.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-panel .chat-window,
.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-composer {
  width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  max-width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-composer {
  padding: 0 0 10px !important;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-panel .chat-window {
  padding: 20px 0 12px;
}

/* Staging: scrollbar on outer edge of chat panel (not inside 768px column) */
.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-body {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-body .chat-window {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  overscroll-behavior: auto;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-body::-webkit-scrollbar {
  width: 10px;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .poe-chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
  background-clip: padding-box;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai {
  width: 100%;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .message-body--ai {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.poe-app.staging-composer-poe .poe-composer {
  padding-bottom: 10px;
}

.poe-app.staging-composer-poe .poe-composer__box {
  flex-direction: column;
  align-items: stretch;
  align-content: flex-start;
  gap: 0;
  padding: 8px 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.poe-app.staging-composer-poe .poe-composer__box:focus-within {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.poe-app.staging-composer-poe .poe-composer__input-wrap {
  width: 100%;
  flex: 0 0 auto;
}

.poe-app.staging-composer-poe .poe-composer__box textarea {
  display: block;
  width: 100%;
  min-height: 52px !important;
  max-height: 200px !important;
  padding: 2px 2px 8px !important;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.poe-app.staging-composer-poe .poe-composer__box textarea::-webkit-scrollbar {
  width: 6px;
}

.poe-app.staging-composer-poe .poe-composer__box textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.poe-app.staging-composer-poe .poe-composer__box textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

.poe-app.staging-composer-poe .poe-composer__box textarea::placeholder {
  color: #94a3b8;
}

.poe-app.staging-composer-poe .poe-composer__bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 100%;
  min-height: 28px;
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.poe-app.staging-composer-poe .poe-composer__bar-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1px;
}

.poe-app.staging-composer-poe .poe-composer__bar-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.poe-app.staging-composer-poe .poe-composer__tool {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #94a3b8;
  flex: 0 0 auto;
}

.poe-app.staging-composer-poe .poe-composer__tool svg {
  width: 15px;
  height: 15px;
}

.poe-app.staging-composer-poe .poe-composer__tool:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

.poe-app.staging-composer-poe .poe-composer__tool.is-active {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
}

.poe-app.staging-composer-poe .poe-composer__translate {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: transparent;
}

.poe-app.staging-composer-poe .poe-composer__translate:hover {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(148, 163, 184, 0.08);
}

.poe-app.staging-composer-poe .poe-composer__translate-glyph {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.08em;
}

.poe-app.staging-composer-poe .poe-composer__model-wrap {
  flex: 0 0 auto;
}

.poe-app.staging-composer-poe .poe-composer__model {
  height: 26px;
  padding: 0 6px 0 4px;
  font-size: 11px;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
}

.poe-app.staging-composer-poe .poe-composer__model:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #334155;
  border-color: transparent;
}

.poe-app.staging-composer-poe .poe-composer__model-dot {
  width: 5px;
  height: 5px;
  background: #10b981;
}

.poe-app.staging-composer-poe .poe-composer__model-chevron {
  width: 11px;
  height: 11px;
  opacity: 0.4;
}

.poe-app.staging-composer-poe .poe-composer__send {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 0;
  padding: 0;
  line-height: 0;
  background: #10b981;
  box-shadow: none;
  flex: 0 0 auto;
}

.poe-app.staging-composer-poe .poe-composer__send:hover:not(:disabled) {
  background: #059669;
  filter: none;
}

.poe-app.staging-composer-poe .poe-composer__send:disabled {
  background: #cbd5e1;
  opacity: 1;
  cursor: default;
}

.poe-app.staging-composer-poe .poe-composer__send-icon {
  grid-area: 1 / 1;
}

.poe-app.staging-composer-poe .poe-composer__send-icon--up {
  width: 14px;
  height: 14px;
}

.poe-app.staging-composer-poe .poe-composer__send-icon--plane {
  display: none !important;
}

.poe-app.staging-composer-poe .poe-composer__send-icon--up {
  display: block !important;
}

html.theme-night .poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(148, 163, 184, 0.18);
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__box {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 20px rgba(0, 0, 0, 0.18);
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__box:focus-within {
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12), 0 6px 20px rgba(0, 0, 0, 0.18);
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__bar {
  border-top-color: rgba(148, 163, 184, 0.12);
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__box textarea::placeholder {
  color: #64748b;
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__tool {
  color: #64748b;
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__tool:hover {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__translate {
  border-color: rgba(148, 163, 184, 0.18);
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__translate-glyph {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__model {
  background: transparent;
  color: #94a3b8;
  border-color: transparent;
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__model:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

html.theme-night .poe-app.staging-composer-poe .poe-composer__send:disabled {
  background: #475569;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming {
  contain: layout style paint;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18), 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Staging only: smoother streaming paint (less layout thrash) */
body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .poe-chat-body {
  overflow-anchor: none;
}

body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .message.ai.is-ai-streaming .message-tools {
  display: none;
}

body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming {
  contain: content;
  content-visibility: visible;
  transform: translateZ(0);
}

body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming .ai-stream-body {
  min-height: 1.75em;
  will-change: contents;
}

body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming .ai-stream-cursor {
  will-change: opacity;
}

body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .message.ai.is-ai-streaming .message-assistant-head__name::after {
  animation-duration: 1.6s;
}

body.staging-stream-smooth.poe-app .poe-chat-nav-rail {
  pointer-events: auto;
}

body.staging-stream-smooth.poe-app .poe-main[data-view="chat"] .message.ai.is-ai-streaming .ai-stream-status {
  margin-top: 4px;
  min-height: 12px;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai.is-ai-streaming .message-assistant-head__name::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: middle;
  animation: poe-stream-live-pulse 1.2s ease-in-out infinite;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai.is-ai-streaming .message-body--ai {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai.is-ai-streaming .message-assistant-head,
.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai.is-ai-streaming .bubble.ai-rich {
  width: 100%;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai.is-ai-streaming .message-tools {
  margin-top: 2px;
  opacity: 1;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .ai-stream-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 6px 0 0;
  padding: 0;
  background: none;
  color: #a3a3a3;
  font-size: 0;
  font-weight: 400;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming .ai-stream-body {
  line-height: 1.75;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming .ai-stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #2563eb;
  animation: poe-stream-cursor-blink 1s step-end infinite;
}

.poe-app.staging-composer-poe .ai-stream-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.poe-app.staging-composer-poe .ai-stream-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  animation: poe-stream-dot-blink 1.2s ease-in-out infinite;
}

.poe-app.staging-composer-poe .ai-stream-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.poe-app.staging-composer-poe .ai-stream-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes poe-stream-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes poe-stream-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

@keyframes poe-stream-dot-blink {
  0%, 70%, 100% { opacity: 0.28; transform: scale(1); }
  35% { opacity: 1; transform: scale(1); }
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming .ai-thinking {
  opacity: 0.72;
}

html.theme-night .poe-app.staging-composer-poe .poe-main[data-view="chat"] .ai-stream-status {
  color: #737373;
}

html.theme-night .poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming {
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.22), 0 1px 2px rgba(0, 0, 0, 0.2);
}

html.theme-night .poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.ai .bubble.ai-rich.is-streaming .ai-stream-cursor {
  background: #60a5fa;
}

/* Staging only: TXT waiting area above composer */
.poe-app:not(.staging-composer-poe) .composer-txt-preview {
  display: none !important;
}

.poe-app.staging-composer-poe .composer-txt-preview {
  display: flex;
  width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  max-width: min(var(--poe-content-width), calc(100% - var(--poe-content-gutter) * 2));
  margin: 0 auto 8px;
  box-sizing: border-box;
}

.poe-app.staging-composer-poe .composer-txt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 36px 8px 10px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  background: rgba(236, 253, 245, 0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
}

.poe-app.staging-composer-poe .composer-txt-item__icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.poe-app.staging-composer-poe .composer-txt-item__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poe-app.staging-composer-poe .composer-txt-item__name {
  color: #065f46;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poe-app.staging-composer-poe .composer-txt-item__hint {
  color: #047857;
  font-size: 12px;
}

.poe-app.staging-composer-poe .composer-txt-item > button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.poe-app.staging-composer-poe .composer-txt-item > button:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.poe-app.staging-composer-poe .message-txt-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.poe-app.staging-composer-poe .message-txt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(236, 253, 245, 0.92);
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
}

.poe-app.staging-composer-poe .message-txt-chip__icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  font-size: 9px;
  font-weight: 800;
}

html.theme-night .poe-app.staging-composer-poe .composer-txt-item {
  background: rgba(6, 78, 59, 0.28);
  border-color: rgba(52, 211, 153, 0.24);
}

html.theme-night .poe-app.staging-composer-poe .composer-txt-item__icon {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

html.theme-night .poe-app.staging-composer-poe .composer-txt-item__name {
  color: #d1fae5;
}

html.theme-night .poe-app.staging-composer-poe .composer-txt-item__hint {
  color: #86efac;
}

html.theme-night .poe-app.staging-composer-poe .composer-txt-item > button {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-composer-poe .composer-txt-item > button:hover {
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
}

html.theme-night .poe-app.staging-composer-poe .message-txt-chip {
  background: rgba(6, 78, 59, 0.35);
  border-color: rgba(52, 211, 153, 0.24);
  color: #d1fae5;
}

html.theme-night .poe-app.staging-composer-poe .message-txt-chip__icon {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

/* Staging only: chat settings drawer (body.staging-chat-settings) */
.poe-app.staging-chat-settings .poe-chat-panel {
  position: relative;
  overflow: hidden;
}

.poe-app.staging-chat-settings .poe-chat-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Staging only: floating message navigation rail */
.poe-app:not(.staging-composer-poe) .poe-chat-nav-rail {
  display: none !important;
}

.poe-app.staging-composer-poe .poe-chat-nav-rail {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(6px);
}

.poe-app.staging-composer-poe .poe-chat-nav-rail__btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.poe-app.staging-composer-poe .poe-chat-nav-rail__btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.poe-app.staging-composer-poe .poe-chat-nav-rail__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.poe-app.staging-composer-poe .poe-main[data-view="chat"] .message.is-nav-focus {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 4px;
  border-radius: 12px;
}

html.theme-night .poe-app.staging-composer-poe .poe-chat-nav-rail {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html.theme-night .poe-app.staging-composer-poe .poe-chat-nav-rail__btn {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-composer-poe .poe-chat-nav-rail__btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

@media (max-width: 900px) {
  .poe-app.staging-composer-poe .poe-chat-nav-rail {
    right: 4px;
    padding: 4px;
  }

  .poe-app.staging-composer-poe .poe-chat-nav-rail__btn {
    width: 28px;
    height: 28px;
  }
}

.poe-app.staging-chat-settings .poe-chat-head__settings {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.poe-app.staging-chat-settings .poe-chat-head__settings:hover,
.poe-app.staging-chat-settings .poe-chat-head__settings.is-active {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.poe-app.staging-chat-settings .chat-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.poe-app.staging-chat-settings .poe-chat-settings-backdrop,
.poe-app.staging-chat-settings .poe-chat-settings {
  display: none !important;
  pointer-events: none;
}

.poe-app.staging-chat-settings .poe-chat-panel.is-settings-open .poe-chat-settings-backdrop {
  display: block !important;
  pointer-events: auto;
  position: absolute;
  inset: 0;
  z-index: 120;
  border: 0;
  background: rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(2px);
  animation: poe-chat-settings-fade-in 0.2s ease;
}

.poe-app.staging-chat-settings .poe-chat-panel.is-settings-open .poe-chat-settings {
  display: flex !important;
  pointer-events: auto;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  width: min(320px, 88vw);
  min-height: 0;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
  box-shadow: -16px 0 40px rgba(17, 24, 39, 0.14);
  animation: poe-chat-settings-slide-in 0.24s ease;
}

@keyframes poe-chat-settings-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes poe-chat-settings-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.poe-app.staging-chat-settings .poe-chat-settings__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.poe-app.staging-chat-settings .poe-chat-settings__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.poe-app.staging-chat-settings .poe-chat-settings__close {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.poe-app.staging-chat-settings .poe-chat-settings__close:hover {
  background: rgba(17, 24, 39, 0.06);
  color: #6b7280;
}

.poe-app.staging-chat-settings .poe-chat-settings__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 20px;
}

.poe-app.staging-chat-settings .poe-chat-settings__section + .poe-chat-settings__section {
  margin-top: 18px;
}

.poe-app.staging-chat-settings .poe-chat-settings__section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.poe-app.staging-chat-settings .poe-chat-settings__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.poe-app.staging-chat-settings .poe-chat-settings__row--slider {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.poe-app.staging-chat-settings .poe-chat-settings__label {
  font-size: 14px;
  color: var(--ink);
}

.poe-app.staging-chat-settings .poe-chat-settings__tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

.poe-app.staging-chat-settings .poe-chat-settings__tip:hover {
  border-color: rgba(236, 72, 153, 0.45);
  color: #be185d;
}

/* 花式代码块（仅内测 · body.staging-fancy-code）— 对齐参考：薄荷绿顶栏 + 限高滚动 */
.poe-app.staging-fancy-code .ai-code-card {
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid rgba(120, 150, 145, 0.28);
  border-radius: 10px;
  background: #f7f8f8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.poe-app.staging-fancy-code .ai-code-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(120, 150, 145, 0.18);
  background: #c8ddd6;
}

.poe-app.staging-fancy-code .ai-code-card__lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.poe-app.staging-fancy-code .ai-code-card__dot {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #f5c542;
  box-shadow: inset 0 0 0 1px rgba(180, 120, 0, 0.18);
  flex: 0 0 auto;
}

.poe-app.staging-fancy-code .ai-code-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.poe-app.staging-fancy-code .ai-code-card__btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.poe-app.staging-fancy-code .ai-code-card__btn:hover {
  background: rgba(255, 255, 255, 0.55);
  color: #0f172a;
}

.poe-app.staging-fancy-code .ai-code-card__btn.is-done {
  color: #059669;
  background: rgba(16, 185, 129, 0.14);
}

.poe-app.staging-fancy-code .ai-code-card__body {
  position: relative;
  background: #f7f8f8;
}

.poe-app.staging-fancy-code .ai-code-card__pre {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  background: #f7f8f8;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

/* 长代码默认限高（与参考图一致：可见内容 + 右侧滚动条） */
.poe-app.staging-fancy-code .ai-code-card.is-compact .ai-code-card__pre {
  max-height: 260px;
}

.poe-app.staging-fancy-code .ai-code-card.is-expanded .ai-code-card__pre {
  max-height: min(70vh, 720px);
}

.poe-app.staging-fancy-code .ai-code-card.is-collapsed .ai-code-card__body {
  display: none;
}

.poe-app.staging-fancy-code .ai-code-card__code {
  display: block;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.65;
  white-space: pre;
  tab-size: 2;
}

.poe-app.staging-fancy-code .ai-tok-kw { color: #7c3aed; font-weight: 600; }
.poe-app.staging-fancy-code .ai-tok-fn { color: #2563eb; }
.poe-app.staging-fancy-code .ai-tok-str { color: #16a34a; }
.poe-app.staging-fancy-code .ai-tok-cmt { color: #94a3b8; font-style: italic; }
.poe-app.staging-fancy-code .ai-tok-num { color: #dc2626; }
.poe-app.staging-fancy-code .ai-tok-prop { color: #ea580c; }

.poe-app.staging-fancy-code .ai-code-card[data-lang="html"] .ai-code-card__dot,
.poe-app.staging-fancy-code .ai-code-card[data-lang="javascript"] .ai-code-card__dot,
.poe-app.staging-fancy-code .ai-code-card[data-lang="js"] .ai-code-card__dot {
  background: #f5c542;
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: #1a2030;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card__bar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: #2a3d3a;
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card__lang {
  color: #e2e8f0;
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card__btn {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card__btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card__body,
html.theme-night .poe-app.staging-fancy-code .ai-code-card__pre {
  background: #121826;
}

html.theme-night .poe-app.staging-fancy-code .ai-code-card__code {
  color: #e2e8f0;
}

html.theme-night .poe-app.staging-fancy-code .ai-tok-kw { color: #c4b5fd; }
html.theme-night .poe-app.staging-fancy-code .ai-tok-fn { color: #93c5fd; }
html.theme-night .poe-app.staging-fancy-code .ai-tok-str { color: #86efac; }
html.theme-night .poe-app.staging-fancy-code .ai-tok-cmt { color: #64748b; }
html.theme-night .poe-app.staging-fancy-code .ai-tok-num { color: #fca5a5; }
html.theme-night .poe-app.staging-fancy-code .ai-tok-prop { color: #fdba74; }

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__tip {
  border-color: rgba(255, 255, 255, 0.18);
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__tip:hover {
  border-color: rgba(236, 72, 153, 0.45);
  color: #fbcfe8;
}

.poe-app.staging-chat-settings .poe-chat-settings__switch {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #d1d5db;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.18s ease;
}

.poe-app.staging-chat-settings .poe-chat-settings__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.18);
  transition: transform 0.18s ease;
}

.poe-app.staging-chat-settings .poe-chat-settings__switch:checked {
  background: #22c55e;
}

.poe-app.staging-chat-settings .poe-chat-settings__switch:checked::after {
  transform: translateX(18px);
}

.poe-app.staging-chat-settings .poe-chat-settings__slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.poe-app.staging-chat-settings .poe-chat-settings__slider-mark {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1;
}

.poe-app.staging-chat-settings .poe-chat-settings__slider-mark--lg {
  font-size: 16px;
}

.poe-app.staging-chat-settings .poe-chat-settings__slider {
  flex: 1 1 auto;
  accent-color: #2563eb;
}

.poe-app.staging-chat-settings .poe-chat-prompt-banner {
  max-width: 768px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(243, 244, 246, 0.92);
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.poe-app.staging-chat-settings.staging-chat-serif .poe-main[data-view="chat"] .message .bubble {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

.poe-app.staging-chat-settings .poe-main[data-view="chat"] .message .bubble {
  font-size: var(--poe-chat-msg-font-size, 15px);
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-panel.is-settings-open .poe-chat-settings {
  background: rgba(15, 23, 42, 0.98);
  border-left-color: rgba(148, 163, 184, 0.2);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.38);
  color: #e2e8f0;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__head {
  border-bottom-color: rgba(148, 163, 184, 0.16);
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__title {
  color: #f1f5f9;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__close {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__close:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__section-title {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__label {
  color: #cbd5e1;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__switch {
  background: #475569;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__switch::after {
  background: #f8fafc;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__slider-mark {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings__slider {
  accent-color: #60a5fa;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-head__settings {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-head__settings:hover,
html.theme-night .poe-app.staging-chat-settings .poe-chat-head__settings.is-active {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-prompt-banner {
  background: rgba(30, 41, 59, 0.88);
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-settings .poe-chat-settings-backdrop {
  background: rgba(2, 6, 23, 0.55);
}

/* Staging only: in-conversation search */
.poe-app.staging-chat-search .poe-chat-head__search {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.poe-app.staging-chat-search .poe-chat-head__search:hover,
.poe-app.staging-chat-search .poe-chat-head__search.is-active {
  background: rgba(236, 72, 153, 0.08);
  color: #be185d;
}

body.poe-chat-search-open {
  overflow: hidden;
}

.poe-chat-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1310;
  display: grid;
  place-items: center;
  padding: 16px;
}

.poe-chat-search-modal[hidden] {
  display: none !important;
}

.poe-chat-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.poe-chat-search-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(82vh, 680px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.poe-chat-search-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
}

.poe-chat-search-modal__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.poe-chat-search-modal__head p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.poe-chat-search-modal__close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.poe-chat-search-modal__close:hover {
  color: var(--ink);
}

.poe-chat-search-modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 0 20px 18px;
}

.poe-chat-search-modal__field {
  position: relative;
  display: block;
}

.poe-chat-search-modal__field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.poe-chat-search-modal__field input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 11px 12px 11px 40px;
  font: inherit;
  color: var(--ink);
  background: #fafafa;
}

.poe-chat-search-modal__field input:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
  background: #fff;
}

.poe-chat-search-modal__results {
  min-height: 120px;
  max-height: min(52vh, 420px);
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fafafa;
}

.poe-chat-search-modal__empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.poe-chat-search-hit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.poe-chat-search-hit:last-child {
  border-bottom: 0;
}

.poe-chat-search-hit:hover,
.poe-chat-search-hit:focus-visible {
  outline: none;
  background: rgba(236, 72, 153, 0.06);
}

.poe-chat-search-hit__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.poe-chat-search-hit__role {
  font-weight: 800;
  color: #be185d;
}

.poe-chat-search-hit__time {
  color: var(--muted);
}

.poe-chat-search-hit__snippet {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.poe-chat-search-hit__snippet mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(250, 204, 21, 0.45);
  color: inherit;
}

html.theme-night .poe-app.staging-chat-search .poe-chat-head__search {
  color: #94a3b8;
}

html.theme-night .poe-app.staging-chat-search .poe-chat-head__search:hover,
html.theme-night .poe-app.staging-chat-search .poe-chat-head__search.is-active {
  background: rgba(236, 72, 153, 0.16);
  color: #f9a8d4;
}

html.theme-night .poe-chat-search-modal__panel {
  background: #111827;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

html.theme-night .poe-chat-search-modal__head h2,
html.theme-night .poe-chat-search-hit__snippet {
  color: #e5e7eb;
}

html.theme-night .poe-chat-search-modal__head p,
html.theme-night .poe-chat-search-modal__empty,
html.theme-night .poe-chat-search-hit__time {
  color: #94a3b8;
}

html.theme-night .poe-chat-search-modal__field input {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

html.theme-night .poe-chat-search-modal__results {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.14);
}

html.theme-night .poe-chat-search-hit {
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

html.theme-night .poe-chat-search-hit:hover,
html.theme-night .poe-chat-search-hit:focus-visible {
  background: rgba(236, 72, 153, 0.12);
}

html.theme-night .poe-chat-search-hit__snippet mark {
  background: rgba(250, 204, 21, 0.28);
}

.poe-app .preview-ai-page .chat-panel,
.poe-app .preview-ai-page .ai-layout {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.poe-app .composer-image-item {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
  color: var(--ink);
}

@media (max-width: 960px) {
  .poe-app-shell {
    grid-template-columns: 1fr;
  }

  .poe-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: min(88vw, 300px);
    height: 100dvh;
    transform: translateX(calc(-100% - 12px));
    transition: transform 0.22s ease;
    box-shadow: 0 20px 60px rgba(84, 54, 25, 0.18);
  }

  .poe-sidebar.is-open {
    transform: translateX(0);
  }

  .poe-sidebar-toggle {
    display: inline-grid;
    place-items: center;
  }

  .poe-mobile-menu {
    display: inline-grid;
    place-items: center;
  }

  .poe-panel-head__menu {
    display: inline-grid;
    place-items: center;
  }

  .poe-home__hero {
    padding-top: 12px;
    align-items: flex-start;
  }

  .poe-logo,
  .poe-mode-pills {
    align-self: center;
  }

  .poe-composer__model-label {
    max-width: 96px;
  }

  .preview-ai-page.poe-app {
    --poe-content-gutter: 10px;
  }
}

/* ── 推广赚会员弹窗 ── */
body.poe-promote-open {
  overflow: hidden;
}

.poe-promote-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.poe-promote-modal[hidden] {
  display: none !important;
}

.poe-promote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.poe-promote-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(236, 72, 153, 0.18);
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.poe-promote-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid rgba(236, 72, 153, 0.1);
}

.poe-promote-modal__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.poe-promote-modal__head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.poe-promote-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(236, 72, 153, 0.08);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.poe-promote-modal__close:hover {
  background: rgba(236, 72, 153, 0.14);
  color: var(--ink);
}

.poe-promote-modal__body {
  padding: 16px 22px 22px;
}

.poe-promote-modal__loading,
.poe-promote-modal__error {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.poe-promote-modal__gate {
  padding: 32px 16px;
  text-align: center;
}

.poe-promote-modal__gate p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.poe-promote-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(236, 72, 153, 0.1);
}

.poe-promote-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.poe-promote-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.poe-promote-invite {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.poe-promote-invite input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(236, 72, 153, 0.22);
  background: #fff;
  font: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--ink);
}

.poe-promote-invite .btn {
  flex-shrink: 0;
}

.poe-promote-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.poe-promote-hint strong {
  color: var(--ink);
}

.poe-promote-rules {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.poe-promote-rules li {
  position: relative;
  padding: 8px 0 8px 26px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  border-bottom: 1px dashed rgba(236, 72, 153, 0.12);
}

.poe-promote-rules li:last-child {
  border-bottom: 0;
}

.poe-promote-rules li::before {
  content: "🎁";
  position: absolute;
  left: 0;
  top: 8px;
}

.poe-promote-rules strong {
  color: var(--accent);
}

.poe-promote-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.poe-promote-stat {
  padding: 12px;
  border-radius: 12px;
  background: rgba(236, 72, 153, 0.06);
  border: 1px solid rgba(236, 72, 153, 0.1);
  text-align: center;
}

.poe-promote-stat .num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.poe-promote-stat .lbl {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.poe-promote-expire {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.poe-promote-expire strong {
  color: var(--ink);
}

.poe-promote-table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(236, 72, 153, 0.12);
}

.poe-promote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.poe-promote-table th,
.poe-promote-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(236, 72, 153, 0.08);
}

.poe-promote-table th {
  background: rgba(236, 72, 153, 0.06);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.poe-promote-table tr:last-child td {
  border-bottom: 0;
}

.poe-promote-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.poe-promote-tag.is-signup {
  background: #eef2ff;
  color: #4338ca;
}

.poe-promote-tag.is-paid {
  background: #fff1f0;
  color: #be123c;
}

.poe-promote-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.poe-promote-modal__toast {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 2;
}

.poe-promote-modal__toast.is-show {
  opacity: 1;
}

@media (max-width: 640px) {
  .poe-promote-invite {
    flex-direction: column;
  }

  .poe-promote-stats {
    grid-template-columns: 1fr;
  }
}

.poe-thread__prompt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.14);
  color: #db2777;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

body.poe-prompt-open {
  overflow: hidden;
}

.poe-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 16px;
}

.poe-prompt-modal[hidden] {
  display: none !important;
}

.poe-prompt-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.poe-prompt-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.poe-prompt-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
}

.poe-prompt-modal__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.poe-prompt-modal__head p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.poe-prompt-modal__close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.poe-prompt-modal__close:hover {
  color: var(--ink);
}

.poe-prompt-modal__body {
  padding: 0 20px 12px;
}

.poe-prompt-modal__body textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  line-height: 1.55;
  color: var(--ink);
  background: #fafafa;
}

.poe-prompt-modal__body textarea:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
  background: #fff;
}

.poe-prompt-modal__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.poe-prompt-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 18px;
}

.poe-prompt-modal__btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.poe-prompt-modal__btn--ghost {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
}

.poe-prompt-modal__btn--primary {
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
}

body.poe-login-gate-open {
  overflow: hidden;
}

.poe-login-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 16px;
}

.poe-login-gate-modal[hidden] {
  display: none !important;
}

.poe-login-gate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

.poe-login-gate-modal__panel {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
  border: 1px solid rgba(236, 72, 153, 0.18);
  box-shadow: 0 24px 60px rgba(236, 72, 153, 0.18);
  text-align: center;
}

.poe-login-gate-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.poe-login-gate-modal__close:hover {
  background: rgba(236, 72, 153, 0.12);
  color: #be185d;
}

.poe-login-gate-modal__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.poe-login-gate-modal__panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
}

.poe-login-gate-modal__lead {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.poe-login-gate-modal__perks {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.poe-login-gate-modal__perks li {
  position: relative;
  margin: 0;
  padding: 9px 0 9px 28px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
  border-bottom: 1px dashed rgba(236, 72, 153, 0.14);
}

.poe-login-gate-modal__perks li:last-child {
  border-bottom: 0;
}

.poe-login-gate-modal__perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 9px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.poe-login-gate-modal__perks strong {
  color: #be185d;
}

.poe-login-gate-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poe-login-gate-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.poe-login-gate-modal__btn--primary {
  background: linear-gradient(135deg, #ec4899, #f97316);
  color: #fff;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.28);
}

.poe-login-gate-modal__btn--primary:hover {
  filter: brightness(1.03);
}

.poe-login-gate-modal__btn--ghost {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}

.poe-login-gate-modal__btn--ghost:hover {
  background: rgba(236, 72, 153, 0.08);
}

/* 夜间：弹窗走深色面板，避免白底 + 浅色字冲突 */
html.theme-night .poe-login-gate-modal__backdrop {
  background: rgba(2, 6, 23, 0.66);
}

html.theme-night .poe-login-gate-modal__panel {
  background: linear-gradient(180deg, #1e293b 0%, #1a2233 100%);
  border-color: rgba(236, 72, 153, 0.28);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

html.theme-night .poe-login-gate-modal__close {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

html.theme-night .poe-login-gate-modal__close:hover {
  background: rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
}

html.theme-night .poe-login-gate-modal__panel h2 {
  color: #f8fafc;
}

html.theme-night .poe-login-gate-modal__lead {
  color: #94a3b8;
}

html.theme-night .poe-login-gate-modal__perks li {
  color: #cbd5e1;
  border-bottom-color: rgba(236, 72, 153, 0.18);
}

html.theme-night .poe-login-gate-modal__perks li::before {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

html.theme-night .poe-login-gate-modal__perks strong {
  color: #f9a8d4;
}

html.theme-night .poe-login-gate-modal__btn--ghost {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

html.theme-night .poe-login-gate-modal__btn--ghost:hover {
  background: rgba(236, 72, 153, 0.18);
  color: #fce7f3;
}

.poe-cloud-sync-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10050;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.poe-cloud-sync-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Prompt 模板库（内测一期） */
.prompt-tpl-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
}

.prompt-tpl-modal[hidden] {
  display: none;
}

.prompt-tpl-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
}

.prompt-tpl-modal__card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 28px));
  max-height: min(780px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #f6f7fb;
  color: #1f2937;
  box-shadow: 0 36px 110px rgba(15, 23, 42, 0.38);
  transform: translate(-50%, -50%);
}

.prompt-tpl-modal__card > header,
.prompt-tpl-modal__card > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 18px 20px;
}

.prompt-tpl-modal__card > header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.prompt-tpl-modal__card > header span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c72f69;
}

.prompt-tpl-modal__card h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.3;
}

.prompt-tpl-modal__card > header p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.prompt-tpl-modal__card > header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.prompt-tpl-modal__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 0;
  padding: 16px 20px;
  overflow: auto;
}

.prompt-tpl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 108px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.prompt-tpl-card:hover {
  border-color: rgba(236, 72, 153, 0.38);
  background: rgba(236, 72, 153, 0.05);
  transform: translateY(-1px);
}

.prompt-tpl-card:focus-visible {
  outline: 2px solid rgba(236, 72, 153, 0.42);
  outline-offset: 2px;
}

.prompt-tpl-card__cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c72f69;
}

.prompt-tpl-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.prompt-tpl-card small {
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.prompt-tpl-modal__card > footer {
  position: relative;
  z-index: 2;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #f6f7fb;
  /* 加大右/下内边距，远离卡片圆角外的 backdrop 命中区 */
  padding: 18px 24px 24px;
}

.prompt-tpl-modal__skip {
  position: relative;
  box-sizing: border-box;
  isolation: isolate;
  min-width: 64px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transform: none;
  /* 固定 1px 边框，hover 只改颜色，避免命中盒抖动 */
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

/* 矩形命中层：盖住胶囊圆角外的「缺角」，悬停不再掉到 footer */
.prompt-tpl-modal__skip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  z-index: -1;
}

.prompt-tpl-modal__skip:hover {
  border-color: rgba(236, 72, 153, 0.35);
  color: #c72f69;
  transform: none;
}

/* 助手设置内：与内测一致，标题在左、按钮在右同一行 */
.assistant-settings-modal .prompt-tpl-settings,
.prompt-tpl-settings {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(236, 72, 153, 0.18);
  border-radius: 14px;
  background: rgba(236, 72, 153, 0.05);
  box-sizing: border-box;
}

.assistant-settings-modal .prompt-tpl-settings__head,
.prompt-tpl-settings__head {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.prompt-tpl-settings__head strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.prompt-tpl-settings__head small {
  display: block !important;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
  font-weight: 450;
}

.assistant-settings-modal .prompt-tpl-settings__btn,
.prompt-tpl-settings__btn {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #c72f69;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.prompt-tpl-settings__btn:hover {
  background: rgba(236, 72, 153, 0.1);
}

@media (max-width: 520px) {
  .assistant-settings-modal .prompt-tpl-settings,
  .prompt-tpl-settings {
    flex-wrap: wrap !important;
  }

  .assistant-settings-modal .prompt-tpl-settings__btn,
  .prompt-tpl-settings__btn {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .prompt-tpl-modal__body {
    grid-template-columns: 1fr;
  }
}

html.theme-night .prompt-tpl-modal__card {
  background: linear-gradient(180deg, #1e293b 0%, #1a2233 100%);
  border-color: rgba(236, 72, 153, 0.28);
  color: #e2e8f0;
}

html.theme-night .prompt-tpl-modal__card > footer {
  background: #1a2233;
}

html.theme-night .prompt-tpl-modal__card > header p,
html.theme-night .prompt-tpl-card small,
html.theme-night .prompt-tpl-settings__head small {
  color: #94a3b8;
}

html.theme-night .prompt-tpl-card,
html.theme-night .prompt-tpl-modal__skip,
html.theme-night .prompt-tpl-settings__btn {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

html.theme-night .prompt-tpl-settings {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.28);
}

/* Prompt 模板库（内测二期：最近使用 / 开场白） */
.prompt-tpl-modal__recent {
  padding: 12px 20px 0;
  flex: 0 0 auto;
}

.prompt-tpl-modal__recent-head {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
}

.prompt-tpl-modal__recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-tpl-recent-chip {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(236, 72, 153, 0.28);
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.07);
  color: #c72f69;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.prompt-tpl-recent-chip:hover {
  background: rgba(236, 72, 153, 0.14);
}

.prompt-tpl-card__greet {
  margin-top: 4px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  color: #0f766e;
}

html.theme-night .prompt-tpl-modal__recent-head {
  color: #94a3b8;
}

html.theme-night .prompt-tpl-recent-chip {
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
}

html.theme-night .prompt-tpl-card__greet {
  color: #5eead4;
}

/* Prompt 模板：页内确认（替代浏览器 confirm） */
.prompt-tpl-confirm {
  position: fixed;
  inset: 0;
  z-index: 1950;
}

.prompt-tpl-confirm[hidden] {
  display: none;
}

.prompt-tpl-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.prompt-tpl-confirm__card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 32px));
  padding: 20px 20px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: #f6f7fb;
  color: #1f2937;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.4);
  transform: translate(-50%, -50%);
}

.prompt-tpl-confirm__card > header span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c72f69;
}

.prompt-tpl-confirm__card h2 {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 1.35;
}

.prompt-tpl-confirm__msg {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
  white-space: pre-wrap;
}

.prompt-tpl-confirm__card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.prompt-tpl-confirm__cancel,
.prompt-tpl-confirm__ok {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.prompt-tpl-confirm__cancel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  color: #334155;
}

.prompt-tpl-confirm__cancel:hover {
  border-color: rgba(236, 72, 153, 0.35);
  color: #c72f69;
}

.prompt-tpl-confirm__ok {
  border: 1px solid rgba(236, 72, 153, 0.35);
  background: #c72f69;
  color: #fff;
}

.prompt-tpl-confirm__ok:hover {
  background: #a82458;
}

html.theme-night .prompt-tpl-confirm__card {
  background: linear-gradient(180deg, #1e293b 0%, #1a2233 100%);
  border-color: rgba(236, 72, 153, 0.28);
  color: #e2e8f0;
}

html.theme-night .prompt-tpl-confirm__msg {
  color: #94a3b8;
}

html.theme-night .prompt-tpl-confirm__cancel {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}
