#auth-page input,
#auth-page button,
#auth-page [role="button"] {
  min-height: 44px;
}

#auth-page button[disabled] {
  cursor: wait;
  opacity: 0.62;
}

.naguang-password-hint {
  margin: 6px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.naguang-auth-real-name-hint,
.naguang-real-name-account-hint {
  margin: 6px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.dark .naguang-password-hint,
.dark .naguang-auth-real-name-hint,
.dark .naguang-real-name-account-hint {
  color: #cbd5e1;
}

.naguang-auth-request-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.naguang-auth-request-status.is-error {
  color: #b42318;
}

.dark .naguang-auth-request-status { color: #cbd5e1; }
.dark .naguang-auth-request-status.is-error { color: #fda29b; }

html.naguang-real-name-open {
  overflow: hidden !important;
}

.naguang-real-name-dialog {
  width: min(520px, calc(100vw - 28px));
  max-width: 520px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  color: #172033;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.naguang-real-name-dialog::backdrop {
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(3px);
}

.naguang-real-name-panel {
  padding: 28px;
}

.naguang-real-name-eyebrow {
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.naguang-real-name-dialog h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

#naguang-real-name-description {
  margin: 12px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

.naguang-real-name-form {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.naguang-real-name-form label {
  color: #1e293b;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
}

.naguang-real-name-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  color: #0f172a;
  background: #ffffff;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  box-sizing: border-box;
}

.naguang-real-name-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.naguang-real-name-form input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.naguang-real-name-helper,
.naguang-real-name-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.naguang-real-name-helper { color: #64748b; }
.naguang-real-name-error { color: #b91c1c; }
.naguang-real-name-error.is-success { color: #047857; }
.naguang-real-name-error[hidden] { display: none !important; }

.naguang-real-name-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.naguang-real-name-actions button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.naguang-real-name-secondary {
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #ffffff;
}

.naguang-real-name-primary {
  border: 1px solid #1d4ed8;
  color: #ffffff;
  background: #2563eb;
}

.naguang-real-name-secondary:hover { background: #f8fafc; }
.naguang-real-name-primary:hover { background: #1d4ed8; }
.naguang-real-name-actions button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}
.naguang-real-name-actions button[disabled] { cursor: wait; opacity: .68; }

.dark .naguang-real-name-dialog {
  color: #e2e8f0;
  background: #0f172a;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .52);
}
.dark .naguang-real-name-dialog h2 { color: #f8fafc; }
.dark #naguang-real-name-description { color: #cbd5e1; }
.dark .naguang-real-name-form label { color: #e2e8f0; }
.dark .naguang-real-name-form input {
  border-color: #475569;
  color: #f8fafc;
  background: #1e293b;
}
.dark .naguang-real-name-helper { color: #94a3b8; }
.dark .naguang-real-name-secondary { border-color: #475569; color: #e2e8f0; background: #1e293b; }
.dark .naguang-real-name-secondary:hover { background: #334155; }

@media (max-width: 480px) {
  .naguang-real-name-panel { padding: 22px 18px 18px; }
  .naguang-real-name-actions { flex-direction: column; }
  .naguang-real-name-actions button { width: 100%; }
}

[data-naguang-native-model-trigger="1"] {
  display: none !important;
  pointer-events: none !important;
}

[data-naguang-native-model-surface="1"] {
  display: none !important;
  pointer-events: none !important;
}

[data-naguang-native-model-add="1"],
[data-naguang-native-controls="1"],
button[aria-label="Add Model"],
button[aria-label="添加模型"],
button[aria-label="Controls"],
button[aria-label="控制"] {
  display: none !important;
  pointer-events: none !important;
}

.naguang-paragraph-submit-status {
  width: min(100%, 960px);
  margin: 8px auto 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.naguang-paragraph-submit-status[role="alert"] {
  color: #b42318;
  font-weight: 650;
}

.naguang-paragraph-recovery-action {
  min-height: 44px;
  margin-left: 8px;
  padding: 9px 14px;
  border: 1px solid #b42318;
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.naguang-paragraph-recovery-action:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.naguang-paragraph-recovery-action.is-secondary {
  border-color: #94a3b8;
  color: #334155;
}

.dark .naguang-paragraph-submit-status { color: #cbd5e1; }
.dark .naguang-paragraph-submit-status[role="alert"] { color: #fda29b; }
.dark .naguang-paragraph-recovery-action {
  border-color: #fda29b;
  background: #1f2937;
  color: #fda29b;
}
.dark .naguang-paragraph-recovery-action.is-secondary {
  border-color: #64748b;
  color: #e2e8f0;
}

.naguang-workbench-boot {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(480px, calc(100vw - 40px));
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  color: #172033;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .12);
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}

.naguang-workbench-boot-heading {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.naguang-workbench-boot p {
  margin: 10px 0 0;
  color: #526078;
  font-size: 14px;
  line-height: 1.65;
}

.naguang-workbench-boot-lines {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.naguang-workbench-boot-lines i {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 25%, #eff6ff 50%, #e2e8f0 75%);
  background-size: 220% 100%;
  animation: naguang-boot-shimmer 1.35s ease-in-out infinite;
}

.naguang-workbench-boot-lines i:nth-child(2) { width: 82%; }
.naguang-workbench-boot-lines i:nth-child(3) { width: 58%; }

.naguang-workbench-boot.is-slow {
  border-color: #fed7aa;
}

.naguang-workbench-boot.is-timeout .naguang-workbench-boot-lines {
  display: none;
}

.naguang-workbench-boot-retry {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 11px;
  color: #ffffff;
  background: #2563eb;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.naguang-workbench-boot-retry[hidden] { display: none !important; }
.naguang-workbench-boot-retry:hover { background: #1d4ed8; }
.naguang-workbench-boot-retry:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 3px;
}

.dark .naguang-workbench-boot {
  border-color: #1d4ed8;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.dark .naguang-workbench-boot-heading { color: #f8fafc; }
.dark .naguang-workbench-boot p { color: #cbd5e1; }
.dark .naguang-workbench-boot-lines i {
  background: linear-gradient(90deg, #334155 25%, #1e3a8a 50%, #334155 75%);
  background-size: 220% 100%;
}

@keyframes naguang-boot-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .naguang-workbench-boot-lines i {
    animation: none;
  }
}

button[aria-label="用户菜单"],
button[aria-label="Controls"],
button[aria-label="更多"],
button[aria-label="扩展功能"],
button[aria-label="Voice Input"],
button[aria-label="语音模式"] {
  min-width: 44px !important;
  min-height: 44px !important;
}

a[href*="source=naguang-nav"] {
  display: inline-flex !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 4px !important;
  padding: 0 14px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  color: #0f3b68 !important;
  background: #fff !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
}

@media (max-width: 640px) {
  a[href*="source=naguang-nav"] {
    min-width: calc(50% - 12px) !important;
    padding-inline: 10px !important;
  }
}

#naguang-service-navigation {
  position: fixed !important;
  z-index: 70 !important;
  top: 84px !important;
  right: 18px !important;
  width: auto !important;
  max-width: calc(100vw - 24px) !important;
  margin: 0 !important;
  color: #172033 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

#naguang-service-navigation > summary {
  display: inline-flex !important;
  min-width: 84px !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 13px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  color: #334155 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  list-style: none !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent;
}

#naguang-service-navigation > summary::-webkit-details-marker { display: none !important; }
#naguang-service-navigation > summary::after {
  margin-left: 1px !important;
  color: #64748b !important;
  content: "▾" !important;
  font-size: 12px !important;
  transition: transform 160ms ease !important;
}
#naguang-service-navigation[open] > summary::after { transform: rotate(180deg) !important; }
#naguang-service-navigation > summary:hover { background: #f1f5f9 !important; }
#naguang-service-navigation > summary:focus-visible,
#naguang-service-navigation a:focus-visible,
#naguang-service-navigation button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .38) !important;
  outline-offset: 3px !important;
}

.naguang-service-navigation-mark {
  display: grid !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 auto !important;
  place-items: center !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: #202123 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#naguang-service-navigation:not([open]) > .naguang-service-navigation-menu {
  display: none !important;
}

#naguang-service-navigation[open] > .naguang-service-navigation-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  bottom: auto !important;
  display: grid !important;
  width: min(224px, calc(100vw - 24px)) !important;
  gap: 4px !important;
  padding: 8px !important;
  border: 1px solid #d7e0eb !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, .99) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .17) !important;
}

#naguang-service-navigation .naguang-service-navigation-menu > a,
#naguang-service-navigation .naguang-service-navigation-menu > button {
  display: flex !important;
  min-height: 44px !important;
  align-items: center !important;
  padding: 0 13px !important;
  border-radius: 10px !important;
  color: #334155 !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  border: 0 !important;
  font-family: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
}

#naguang-service-navigation .naguang-service-navigation-menu > a:hover,
#naguang-service-navigation .naguang-service-navigation-menu > button:hover {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}

#naguang-service-navigation .naguang-service-navigation-menu > a[aria-current="page"] {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}

#naguang-service-navigation.naguang-service-navigation-inline {
  position: relative !important;
  z-index: 70 !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: 0 0 auto !important;
  margin: 0 4px 0 auto !important;
}

#naguang-service-navigation.naguang-service-navigation-inline > summary {
  min-width: 84px !important;
  box-shadow: none !important;
}

.dark #naguang-service-navigation > summary,
.dark #naguang-service-navigation[open] > .naguang-service-navigation-menu {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  background: rgba(15, 23, 42, .98) !important;
}
.dark #naguang-service-navigation > summary:hover { background: #1e293b !important; }
.dark #naguang-service-navigation .naguang-service-navigation-menu > a,
.dark #naguang-service-navigation .naguang-service-navigation-menu > button { color: #e2e8f0 !important; }
.dark #naguang-service-navigation .naguang-service-navigation-menu > a:hover,
.dark #naguang-service-navigation .naguang-service-navigation-menu > button:hover {
  color: #bfdbfe !important;
  background: rgba(37, 99, 235, .22) !important;
}

@media (max-width: 640px) {
  #naguang-service-navigation {
    top: calc(72px + env(safe-area-inset-top)) !important;
    right: 12px !important;
    bottom: auto !important;
  }
  #naguang-service-navigation > summary {
    min-width: 120px !important;
    min-height: 48px !important;
  }
  #naguang-service-navigation[open] > .naguang-service-navigation-menu {
    top: calc(100% + 8px) !important;
    right: 0 !important;
    bottom: auto !important;
  }
  #naguang-service-navigation.naguang-service-navigation-inline {
    position: relative !important;
    z-index: 70 !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
    margin: 0 4px 0 auto !important;
  }
  #naguang-service-navigation.naguang-service-navigation-inline > summary {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }
  #naguang-service-navigation.naguang-service-navigation-inline > summary::after {
    display: none !important;
  }
  #naguang-service-navigation.naguang-service-navigation-inline .naguang-service-navigation-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

.naguang-paragraph-onboarding {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto 18px;
  padding: 0 8px 2px;
  border: 0;
  color: #202123;
  background: transparent;
  text-align: center;
  box-sizing: border-box;
}

.naguang-paragraph-onboarding-copy { min-width: 0; }

.naguang-paragraph-onboarding h2 {
  margin: 0 !important;
  color: #202123;
  font-size: clamp(26px, 2.4vw, 34px) !important;
  font-weight: 700 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.035em !important;
}

.naguang-paragraph-onboarding p {
  margin: 8px auto 0 !important;
  max-width: 42ch;
  color: #6b6b6b;
  font-size: 15px;
  line-height: 1.65;
}

.dark .naguang-paragraph-onboarding {
  color: #e2e8f0;
  background: transparent;
}
.dark .naguang-paragraph-onboarding h2 { color: #f8fafc; }
.dark .naguang-paragraph-onboarding p { color: #cbd5e1; }

.naguang-paragraph-composer-label {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0 4px 3px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
  box-sizing: border-box;
}

.naguang-paragraph-composer-label > span {
  color: #64748b;
  font-size: 12px;
}

.dark .naguang-paragraph-composer-label { color: #f8fafc; }
.dark .naguang-paragraph-composer-label > span { color: #94a3b8; }

.naguang-paragraph-input-guidance {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 5px 4px 0;
  color: #526078;
  font-size: 12px;
  line-height: 1.5;
  box-sizing: border-box;
}

html.naguang-paragraph-workbench #chat-input-container {
  min-height: 104px !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08) !important;
}

html.naguang-paragraph-workbench #message-input-container {
  width: min(760px, calc(100% - 28px)) !important;
  max-width: 760px !important;
  margin-right: auto !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

html.naguang-paragraph-workbench #chat-input {
  min-height: 56px !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

html.naguang-paragraph-workbench #chat-input p.is-empty:first-child::before,
html.naguang-paragraph-workbench #chat-input p.is-editor-empty:first-child::before {
  color: #64748b !important;
  content: "粘贴一段直播逐字稿，我来改成可直接口播版" !important;
}

html.naguang-paragraph-workbench #message-input-container button[aria-label="Voice Input"],
html.naguang-paragraph-workbench #message-input-container button[aria-label="语音输入"],
html.naguang-paragraph-workbench #message-input-container button[aria-label="语音模式"] {
  display: none !important;
}

html.naguang-paragraph-workbench #message-input-container .naguang-paragraph-submit {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin-right: 1px !important;
  border: 1px solid #1d4ed8 !important;
  color: #ffffff !important;
  background: #2563eb !important;
}

html.naguang-paragraph-workbench #message-input-container .naguang-paragraph-submit:hover {
  background: #1d4ed8 !important;
}

html.naguang-paragraph-workbench #message-input-container .naguang-paragraph-submit:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35) !important;
  outline-offset: 2px !important;
}

html.naguang-paragraph-workbench #naguang-paragraph-default-action,
html.naguang-paragraph-workbench #naguang-redundant-model-banner {
  display: none !important;
}

html.naguang-paragraph-workbench [data-naguang-paragraph-floating-hidden="1"] {
  display: none !important;
}

html.naguang-paragraph-workbench .naguang-product-version[data-naguang-product-version="1"] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .naguang-paragraph-onboarding *,
  #naguang-service-navigation * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .naguang-paragraph-onboarding {
    padding: 4px 2px 8px;
  }

  .naguang-paragraph-composer-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .naguang-paragraph-input-guidance {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.naguang-paragraph-character-count {
  flex: 0 0 auto;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.naguang-paragraph-character-count.is-outside-recommendation {
  color: #9a3412;
  font-weight: 700;
}

.naguang-paragraph-character-count.is-ready {
  color: #047857;
  font-weight: 750;
}

.dark .naguang-paragraph-input-guidance,
.dark .naguang-paragraph-character-count { color: #cbd5e1; }
.dark .naguang-paragraph-character-count.is-outside-recommendation { color: #fdba74; }
.dark .naguang-paragraph-character-count.is-ready { color: #6ee7b7; }

.naguang-paragraph-focus-action,
.naguang-paragraph-result button,
.naguang-paragraph-result summary,
.naguang-paragraph-error button,
.naguang-paragraph-restore-notice button,
.naguang-paragraph-source > summary {
  min-height: 44px !important;
  touch-action: manipulation;
}

.naguang-paragraph-focus-action:focus-visible,
.naguang-paragraph-result button:focus-visible,
.naguang-paragraph-result summary:focus-visible,
.naguang-paragraph-error button:focus-visible,
.naguang-paragraph-restore-notice button:focus-visible,
.naguang-paragraph-source > summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35) !important;
  outline-offset: 2px !important;
}

.naguang-paragraph-result {
  width: 100%;
  max-width: 820px;
  min-width: 0;
  margin: 10px auto 2px;
  color: #202123;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
}

.naguang-paragraph-review-required {
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px solid #fbbf24;
  border-radius: 14px;
  color: #78350f;
  background: #fffbeb;
}

.naguang-paragraph-review-required h3 {
  margin: 0 !important;
  color: #78350f;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}

.naguang-paragraph-review-required p {
  margin: 6px 0 0 !important;
  color: #92400e;
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.naguang-paragraph-source-usable {
  border-color: #86efac;
  color: #14532d;
  background: #f0fdf4;
}

.naguang-paragraph-source-usable h3,
.naguang-paragraph-source-usable p {
  color: #166534;
}

.naguang-paragraph-near-zero {
  border-color: #f59e0b;
  color: #78350f;
  background: #fffbeb;
}

.naguang-paragraph-near-zero h3,
.naguang-paragraph-near-zero p {
  color: #78350f;
}

.naguang-paragraph-oral-card {
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
}

.naguang-paragraph-oral-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.naguang-paragraph-oral-header h3 {
  margin: 0 !important;
  color: #202123;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

.naguang-paragraph-copy,
.naguang-paragraph-next-button,
.naguang-paragraph-reoptimize,
.naguang-paragraph-error-primary,
.naguang-paragraph-error-secondary,
.naguang-paragraph-restore-send,
.naguang-paragraph-restore-edit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
}

.naguang-paragraph-copy,
.naguang-paragraph-next-button,
.naguang-paragraph-error-primary,
.naguang-paragraph-restore-send {
  border: 1px solid #1d4ed8;
  color: #ffffff;
  background: #2563eb;
}

.naguang-paragraph-copy:hover,
.naguang-paragraph-next-button:hover,
.naguang-paragraph-error-primary:hover,
.naguang-paragraph-restore-send:hover { background: #1d4ed8; }

.naguang-paragraph-copy[disabled],
.naguang-paragraph-reoptimize[disabled],
.naguang-paragraph-error-primary[disabled],
.naguang-paragraph-restore-send[disabled] {
  cursor: wait;
  opacity: .68;
}

.naguang-paragraph-oral-body {
  color: #202123;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.naguang-paragraph-oral-body > :first-child { margin-top: 0 !important; }
.naguang-paragraph-oral-body > :last-child { margin-bottom: 0 !important; }

.naguang-paragraph-copy-status {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  color: #047857;
  font-size: 12px;
  line-height: 1.5;
}

.naguang-paragraph-supporting {
  margin-top: 10px;
}

.naguang-paragraph-analysis {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.naguang-paragraph-analysis > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 15px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.naguang-paragraph-analysis > summary::-webkit-details-marker { display: none; }

.naguang-paragraph-analysis > summary::after {
  color: #6b7280;
  content: "⌄";
  font-size: 16px;
  transition: transform 160ms ease;
}

.naguang-paragraph-analysis[open] > summary::after { transform: rotate(180deg); }

.naguang-paragraph-analysis-body {
  padding: 2px 15px 15px;
  color: #475569;
  font-size: 14px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.naguang-paragraph-analysis-section {
  padding: 14px 0;
  border-top: 1px solid #f1f5f9;
}

.naguang-paragraph-analysis-section h4 {
  margin: 0 0 6px !important;
  color: #202123;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}

.naguang-paragraph-analysis-content > :first-child { margin-top: 0 !important; }
.naguang-paragraph-analysis-content > :last-child { margin-bottom: 0 !important; }

.naguang-paragraph-analysis-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.naguang-paragraph-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 2px 0;
  border-radius: 0;
  background: transparent;
}

.naguang-paragraph-next p {
  margin: 0 !important;
  color: #526078;
  font-size: 13px;
  line-height: 1.55;
}

.naguang-paragraph-next-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.naguang-paragraph-reoptimize {
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  background: #ffffff;
}

.naguang-paragraph-reoptimize:hover { background: #eff6ff; }

.naguang-paragraph-source {
  display: none !important;
}

html.naguang-paragraph-workbench
  [data-naguang-paragraph-native-actions="1"]
  .naguang-paragraph-native-action-hidden {
  display: none !important;
}

.naguang-paragraph-elapsed {
  margin: 7px 0 0 !important;
  color: #526078;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

/* A rendered success or failure card is terminal for that turn. Open WebUI can
   retain the older synthetic progress row, so hide that stale row instead of
   showing a finished card and an active timer at the same time. */
button.naguang-paragraph-stale-wait {
  display: none !important;
}

.naguang-paragraph-error {
  width: 100%;
  max-width: 820px;
  min-width: 0;
  margin: 10px auto 2px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  color: #991b1b;
  background: #fef2f2;
  box-sizing: border-box;
}

.naguang-paragraph-error-source {
  display: none !important;
}

.naguang-paragraph-technical-fallback {
  border-color: #fca5a5;
  color: #7f1d1d;
  background: #fef2f2;
}

.naguang-paragraph-technical-fallback h3 { color: #991b1b; }

.naguang-paragraph-error h3 {
  margin: 0 !important;
  color: #991b1b;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.naguang-paragraph-error p {
  margin: 8px 0 0 !important;
  font-size: 14px;
  line-height: 1.65;
}

.naguang-paragraph-retry-status {
  color: #7c2d12;
  font-weight: 650;
}

.naguang-paragraph-retry-status:empty { display: none; }

.naguang-paragraph-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.naguang-paragraph-error-secondary {
  border: 1px solid #fdba74;
  color: #9a3412;
  background: #ffffff;
}

.naguang-paragraph-error-secondary:hover { background: #ffedd5; }

.naguang-paragraph-restore-notice {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #93c5fd;
  border-radius: 13px;
  color: #1e3a5f;
  background: #eff6ff;
}

.naguang-paragraph-restore-notice p {
  margin: 0 !important;
  color: inherit;
  font-size: 14px;
  line-height: 1.65;
}

.naguang-paragraph-restore-notice p:first-child { font-weight: 750; }

.naguang-paragraph-restore-status {
  margin-top: 5px !important;
  color: #334e68 !important;
}

.naguang-paragraph-restore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.naguang-paragraph-restore-edit {
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  background: #ffffff;
}

.naguang-paragraph-restore-edit:hover { background: #dbeafe; }

.dark .naguang-paragraph-result { color: #e2e8f0; }
.dark .naguang-paragraph-review-required {
  border-color: #b45309;
  color: #fde68a;
  background: rgba(120, 53, 15, .28);
}
.dark .naguang-paragraph-review-required h3,
.dark .naguang-paragraph-review-required p { color: #fde68a; }
.dark .naguang-paragraph-source-usable {
  border-color: #15803d;
  color: #bbf7d0;
  background: rgba(20, 83, 45, .32);
}
.dark .naguang-paragraph-source-usable h3,
.dark .naguang-paragraph-source-usable p { color: #bbf7d0; }
.dark .naguang-paragraph-near-zero {
  border-color: #d97706;
  color: #fde68a;
  background: rgba(120, 53, 15, .28);
}
.dark .naguang-paragraph-near-zero h3,
.dark .naguang-paragraph-near-zero p { color: #fde68a; }
.dark .naguang-paragraph-oral-card {
  border-color: #1d4ed8;
  background: #111827;
  box-shadow: none;
}
.dark .naguang-paragraph-oral-header h3 { color: #bfdbfe; }
.dark .naguang-paragraph-oral-body { color: #f1f5f9; }
.dark .naguang-paragraph-analysis { border-color: #334155; background: #111827; }
.dark .naguang-paragraph-analysis > summary,
.dark .naguang-paragraph-analysis-section h4 { color: #e2e8f0; }
.dark .naguang-paragraph-analysis-body,
.dark .naguang-paragraph-next p,
.dark .naguang-paragraph-elapsed { color: #cbd5e1; }
.dark .naguang-paragraph-analysis-section,
.dark .naguang-paragraph-analysis-actions { border-color: #1e293b; }
.dark .naguang-paragraph-next { background: transparent; }
.dark .naguang-paragraph-reoptimize { border-color: #1d4ed8; color: #bfdbfe; background: #111827; }
.dark .naguang-paragraph-reoptimize:hover { background: #172554; }
.dark .naguang-paragraph-error { border-color: #9a3412; color: #fed7aa; background: rgba(124, 45, 18, .28); }
.dark .naguang-paragraph-error h3 { color: #fed7aa; }
.dark .naguang-paragraph-technical-fallback {
  border-color: #b91c1c;
  color: #fecaca;
  background: rgba(127, 29, 29, .32);
}
.dark .naguang-paragraph-technical-fallback h3 { color: #fecaca; }
.dark .naguang-paragraph-error-secondary { border-color: #c2410c; color: #fed7aa; background: #1e293b; }
.dark .naguang-paragraph-restore-notice { border-color: #1d4ed8; color: #dbeafe; background: #172554; }
.dark .naguang-paragraph-restore-status { color: #bfdbfe !important; }
.dark .naguang-paragraph-restore-edit { border-color: #3b82f6; color: #bfdbfe; background: #111827; }
.dark .naguang-paragraph-restore-edit:hover { background: #1e3a8a; }

@media (max-width: 640px) {
  .naguang-paragraph-onboarding {
    padding: 4px 2px 8px;
  }
  .naguang-paragraph-oral-card,
  .naguang-paragraph-error { padding: 15px; border-radius: 15px; }
  .naguang-paragraph-oral-header,
  .naguang-paragraph-next { align-items: stretch; flex-direction: column; }
  .naguang-paragraph-copy,
  .naguang-paragraph-next-button,
  .naguang-paragraph-reoptimize { width: 100%; }
  .naguang-paragraph-analysis,
  .naguang-paragraph-analysis-actions { width: 100%; }
  .naguang-paragraph-next-actions { width: 100%; }
  .naguang-paragraph-error-actions > button { flex: 1 1 100%; }
  .naguang-paragraph-restore-actions > button { flex: 1 1 100%; }
}

.naguang-job-card {
  --naguang-job-accent: #2563eb;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 14px 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-left: 4px solid var(--naguang-job-accent);
  border-radius: 16px;
  color: #172033;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  box-sizing: border-box;
}

.dark .naguang-job-card {
  border-color: #334155;
  color: #f1f5f9;
  background: #111827;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.naguang-job-card[data-status="completed"] { --naguang-job-accent: #0f766e; }
.naguang-job-card[data-status="failed"],
.naguang-job-card[data-status="network-error"],
.naguang-job-card[data-status="polling-expired"] { --naguang-job-accent: #c2410c; }

.naguang-job-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.naguang-job-title {
  min-width: 0;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.naguang-job-status {
  display: inline-flex;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.naguang-job-card[data-status="completed"] .naguang-job-status {
  color: #047857;
  background: #ecfdf5;
}

.naguang-job-card[data-status="failed"] .naguang-job-status,
.naguang-job-card[data-status="network-error"] .naguang-job-status,
.naguang-job-card[data-status="polling-expired"] .naguang-job-status {
  color: #9a3412;
  background: #fff7ed;
}

.dark .naguang-job-status { color: #bfdbfe; background: rgba(37, 99, 235, .22); }
.dark .naguang-job-card[data-status="completed"] .naguang-job-status { color: #a7f3d0; background: rgba(15, 118, 110, .24); }
.dark .naguang-job-card[data-status="failed"] .naguang-job-status,
.dark .naguang-job-card[data-status="network-error"] .naguang-job-status,
.dark .naguang-job-card[data-status="polling-expired"] .naguang-job-status { color: #fed7aa; background: rgba(194, 65, 12, .24); }

.naguang-job-card[data-status="failed"],
.naguang-job-card[data-status="network-error"],
.naguang-job-card[data-status="polling-expired"] {
  background: #fffaf5;
}

.dark .naguang-job-card[data-status="failed"],
.dark .naguang-job-card[data-status="network-error"],
.dark .naguang-job-card[data-status="polling-expired"] {
  background: #191512;
}

.naguang-job-card[data-status="failed"] .naguang-job-meta > span:first-child,
.naguang-job-card[data-status="network-error"] .naguang-job-meta > span:first-child,
.naguang-job-card[data-status="polling-expired"] .naguang-job-meta > span:first-child {
  color: var(--naguang-job-accent);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.naguang-job-card[data-status="failed"] .naguang-job-stage {
  color: #7c2d12;
  font-weight: 600;
}

.dark .naguang-job-card[data-status="failed"] .naguang-job-stage { color: #fdba74; }

.naguang-job-stage {
  margin-top: 10px;
  color: #526078;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.dark .naguang-job-stage { color: #cbd5e1; }

.naguang-job-progress {
  position: relative;
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dark .naguang-job-progress { background: #334155; }

.naguang-job-progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--naguang-job-accent);
  transform: scaleX(var(--naguang-job-progress, 0));
  transform-origin: left center;
  transition: transform 220ms ease-out, background-color 180ms ease;
}

.naguang-job-card.is-loading .naguang-job-progress-fill {
  --naguang-job-progress: .08;
  animation: naguang-job-waiting 1.2s ease-in-out infinite alternate;
}

@keyframes naguang-job-waiting {
  from { transform: translateX(-12%) scaleX(.08); }
  to { transform: translateX(12%) scaleX(.24); }
}

@media (prefers-reduced-motion: reduce) {
  .naguang-job-card.is-loading .naguang-job-progress-fill {
    animation: none;
  }
}

.naguang-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 9px;
  color: #64748b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.dark .naguang-job-meta { color: #94a3b8; }

.naguang-job-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.naguang-job-files:empty { display: none; }

.naguang-job-file,
.naguang-job-file-note {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.naguang-job-file {
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}

.naguang-job-file:hover { background: #dbeafe; }
.naguang-job-file:focus-visible,
.naguang-job-refresh:focus-visible,
.naguang-job-raw:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

.naguang-job-file-note { color: #526078; background: #f8fafc; }
.dark .naguang-job-file { border-color: #1d4ed8; color: #bfdbfe; background: rgba(37, 99, 235, .20); }
.dark .naguang-job-file:hover { background: rgba(37, 99, 235, .32); }
.dark .naguang-job-file-note { color: #cbd5e1; background: #1e293b; }

.naguang-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.naguang-job-refresh,
.naguang-job-raw {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #334155;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.naguang-job-refresh:hover,
.naguang-job-raw:hover { background: #f1f5f9; }

.naguang-job-refresh[aria-busy="true"] { cursor: wait; opacity: .65; }
.dark .naguang-job-refresh,
.dark .naguang-job-raw { border-color: #475569; color: #e2e8f0; background: #1e293b; }
.dark .naguang-job-refresh:hover,
.dark .naguang-job-raw:hover { background: #334155; }

.naguang-job-fallback {
  font-size: 12px;
  text-underline-offset: 3px;
}

@media (max-width: 480px) {
  .naguang-job-card { padding: 15px; border-radius: 14px; }
  .naguang-job-heading { align-items: flex-start; }
  .naguang-job-actions > * { flex: 1 1 calc(50% - 4px); }
  .naguang-job-file { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #auth-page *,
  .naguang-real-name-dialog *,
  a[href*="source=naguang-nav"],
  #naguang-service-navigation > summary::after,
  .naguang-paragraph-result *,
  .naguang-paragraph-error *,
  .naguang-paragraph-restore-notice *,
  .naguang-workbench-boot-lines i,
  .naguang-job-progress-fill {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
