/* ============================================================
   农资短视频脚本 AI 生成器 —— Apple 风简约设计
   ============================================================ */

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #1c1c1e;
  --surface: rgba(28, 28, 30, 0.72);
  --surface-2: rgba(44, 44, 46, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f5f5f7;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-muted: rgba(235, 235, 245, 0.38);
  --accent: #30d158;
  --accent-soft: rgba(48, 209, 88, 0.16);
  --accent-text: #30d158;
  --danger: #ff453a;
  --input-bg: rgba(28, 28, 30, 0.6);
  --input-border: rgba(255, 255, 255, 0.10);
  --autofill-bg: #2c2c2e;
  --autofill-text: #f5f5f7;
  --hint-bg: rgba(255, 255, 255, 0.04);
  --code-bg: rgba(48, 209, 88, 0.12);
  --result-bg: rgba(28, 28, 30, 0.4);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 60px rgba(0,0,0,0.5);
  --blur: blur(40px) saturate(180%);
}

:root[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(245, 245, 247, 0.6);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text-primary: #1d1d1f;
  --text-secondary: rgba(60, 60, 67, 0.7);
  --text-muted: rgba(60, 60, 67, 0.4);
  --accent: #248a3d;
  --accent-soft: rgba(36, 138, 61, 0.10);
  --accent-text: #248a3d;
  --danger: #d70015;
  --input-bg: rgba(255, 255, 255, 0.6);
  --input-border: rgba(0, 0, 0, 0.10);
  --autofill-bg: #ffffff;
  --autofill-text: #1d1d1f;
  --hint-bg: rgba(0, 0, 0, 0.025);
  --code-bg: rgba(36, 138, 61, 0.10);
  --result-bg: rgba(255, 255, 255, 0.5);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 32px rgba(0,0,0,0.06);
  --blur: blur(30px) saturate(180%);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  position: relative;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}

/* 极简背景：单一柔和渐晕 */
:root[data-theme="dark"] body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(60vw 50vw at 80% -10%, rgba(48, 209, 88, 0.08), transparent 70%),
    radial-gradient(50vw 40vw at -10% 100%, rgba(0, 122, 255, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
:root[data-theme="light"] body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(50vw 40vw at 90% -10%, rgba(36, 138, 61, 0.08), transparent 70%),
    radial-gradient(50vw 40vw at 0% 100%, rgba(0, 122, 255, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
a { color: inherit; }

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0;
  z-index: 100;
  padding: 14px clamp(16px, 4vw, 36px);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 0.5px solid var(--border);
}
.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-badge {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.logo-badge .logo-emoji { font-size: 18px; }
.logo-badge .logo-ring { display: none; }
.brand h1 {
  font-size: clamp(15px, 2.4vw, 17px);
  color: var(--text-primary);
  font-weight: 600;
}
.tagline {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.top-right { display: inline-flex; align-items: center; gap: 10px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--accent);
}
.status-pill .status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 640px) { .status-pill { display: none; } }

/* ============ 主题切换：胶囊开关 ============ */
.theme-toggle {
  width: 44px; height: 26px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background .2s ease, border-color .2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle .knob {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-elev);
  display: grid; place-items: center;
  font-size: 11px;
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
:root[data-theme="dark"] .theme-toggle .knob { transform: translateX(18px); }
:root[data-theme="dark"] .theme-toggle .knob::before { content: '🌙'; }
:root[data-theme="light"] .theme-toggle .knob::before { content: '☀️'; }

/* ============ Container ============ */
.container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 32px) 64px;
  display: grid;
  gap: clamp(16px, 2.5vw, 20px);
}

/* ============ Card ============ */
.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 0.5px solid var(--border);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-card);
}
/* 隐藏旧装饰 */
.card::before, .corner { display: none !important; }
.scanline { display: none !important; }

.card-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.card-title::before { display: none; }

/* ============ Form ============ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.label i { color: var(--danger); font-style: normal; }
.opt-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
  background: var(--hint-bg);
  border: none;
  font-family: inherit;
}

input[type="text"], input[type="number"], input[type="email"],
input[type="tel"], input[type="search"], input[type="url"], input[type="password"],
input.input, input:not([type]),
select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  outline: none;
  letter-spacing: -0.01em;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.hint {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--hint-bg);
  padding: 10px 14px;
  border-radius: 9px;
  border: none;
  border-left: none;
  line-height: 1.55;
  margin-top: 4px;
}
.hint.active { color: var(--text-primary); }
.hint b { color: var(--accent); font-weight: 600; }

/* ============ Buttons ============ */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  transition: background .15s ease, opacity .15s ease, transform .08s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: none;
}
.btn-primary::before, .btn-primary::after { display: none !important; }
.btn-primary:hover { background: var(--accent); opacity: 0.88; }
.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-ghost {
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }

/* ============ Weather HUD —— Apple 风信息卡 ============ */
.weather-hud {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--hint-bg);
  border: none;
  font-size: 13px;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}
.weather-hud::before { display: none; }
.hud-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--border);
}
.hud-tag {
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-secondary);
  font-size: 12px;
}
.hud-loc {
  flex: 1;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
}
.hud-status {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 500;
}
.hud-body { display: grid; gap: 8px; }
.hud-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}
.hud-day {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}
.hud-detail { color: var(--text-primary); font-size: 13px; }
.hud-detail b { color: var(--text-primary); font-weight: 600; }
.hud-empty {
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 4px 0;
}
@media (max-width: 640px) {
  .hud-row { grid-template-columns: 48px 1fr; }
}

/* ============ Result ============ */
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.jianying-export-tip {
  margin: -4px 0 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.result-body {
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  min-height: 200px;
  word-wrap: break-word;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-primary);
}
.result-body::before { display: none; }
.result-body:empty::after {
  content: '脚本创作中……';
  color: var(--text-muted);
  font-size: 14px;
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  letter-spacing: 0.02em;
}

/* ============ Markdown ============ */
.markdown h1, .markdown h2 {
  color: var(--text-primary);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 8px;
  margin: 24px 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.markdown h2:first-child, .markdown h1:first-child { margin-top: 0; }
.markdown h3 {
  color: var(--text-primary);
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 600;
  border-left: none;
  padding-left: 0;
  letter-spacing: -0.01em;
}
.markdown h3::after { display: none; }
.markdown p { margin: 6px 0; color: var(--text-primary); }
.markdown ul, .markdown ol { padding-left: 22px; margin: 6px 0; }
.markdown li { margin: 4px 0; }
.markdown strong { color: var(--text-primary); font-weight: 600; }
.markdown code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
  font-family: "SF Mono", ui-monospace, "JetBrains Mono", monospace;
}

/* 流式光标 */
.streaming::after {
  content: '';
  display: inline-block;
  width: 6px; height: 14px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 1px;
  animation: cursor-blink 1.05s steps(2) infinite;
}
@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text-primary);
  border: 0.5px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 1000;
  animation: toast-in .22s cubic-bezier(.22,.61,.36,1);
  max-width: 88vw;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.toast.error { color: var(--danger); }
.toast.success { color: var(--accent); }
.toast.warning { color: #ff9500; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============ Audit Toast (可展开) ============ */
.audit-toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  z-index: 1001;
  animation: toast-in .22s cubic-bezier(.22,.61,.36,1);
  max-width: min(560px, 92vw);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  overflow: hidden;
  font-size: 13px;
}
.audit-toast-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #ff9500;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  font-family: inherit;
}
.audit-toast-summary:hover { background: rgba(255, 149, 0, 0.06); }
.audit-toast-icon { flex: 0 0 auto; font-size: 14px; }
.audit-toast-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.audit-toast-chevron {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
  transition: transform .18s ease;
}
.audit-toast.expanded .audit-toast-chevron { transform: rotate(180deg); }
.audit-toast-detail {
  border-top: 0.5px solid var(--border);
  padding: 8px 14px 12px;
  max-height: 50vh;
  overflow-y: auto;
  background: var(--input-bg);
}
.audit-issue-group { margin-top: 8px; }
.audit-issue-group:first-child { margin-top: 4px; }
.audit-issue-group-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}
.audit-issue-type-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 149, 0, 0.12);
  color: #c2410c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.audit-hit-item {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-left: 2px solid rgba(255, 149, 0, 0.5);
  margin: 4px 0 4px 4px;
  background: rgba(255, 149, 0, 0.04);
  border-radius: 0 6px 6px 0;
  word-break: break-word;
}
.audit-hit-item .audit-hit-word {
  background: rgba(255, 149, 0, 0.25);
  color: var(--text-primary);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 600;
}
.audit-toast-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 0.5px dashed var(--border);
}
.audit-toast-foot button {
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.audit-toast-foot button:hover { color: var(--text-primary); border-color: var(--text-secondary); }

/* ============ Pest Suggest Chips (作物-月份动态提示) ============ */
.pest-suggest {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  animation: pest-suggest-in .22s cubic-bezier(.22,.61,.36,1);
}
.pest-suggest-prefix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 11.5px;
}
.pest-suggest-prefix::before {
  content: '💡';
  font-size: 11px;
}
.pest-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.pest-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 0.5px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  user-select: none;
}
.pest-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.pest-chip:active { transform: translateY(0); }
.pest-chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
@keyframes pest-suggest-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ Rating Bar (脚本评分) ============ */
.rating-bar {
  margin-top: 16px;
  padding: 14px 16px;
  border: 0.5px dashed var(--border);
  border-radius: 12px;
  background: var(--input-bg);
  animation: pest-suggest-in .26s cubic-bezier(.22,.61,.36,1);
}
.rating-bar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.rating-bar-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.rating-stars {
  display: inline-flex;
  gap: 2px;
}
.rating-star {
  background: transparent;
  border: 0;
  padding: 2px 4px;
  font-size: 22px;
  line-height: 1;
  color: var(--border);
  cursor: pointer;
  transition: color .15s ease, transform .12s ease;
  font-family: inherit;
  user-select: none;
}
.rating-star:hover { transform: scale(1.12); }
.rating-star.is-filled { color: #ffb400; }
.rating-star.is-preview { color: #ffd66b; }
.rating-stars[aria-disabled="true"] .rating-star {
  cursor: default;
  pointer-events: none;
}
.rating-bar-tip {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1 1 auto;
  text-align: right;
  min-width: 60px;
}
.rating-bar-tip.is-success { color: var(--accent); }
.rating-bar-tip.is-error { color: var(--danger); }
.rating-reason {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rating-reason textarea {
  width: 100%;
  resize: vertical;
  padding: 8px 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  transition: border-color .15s ease;
}
.rating-reason textarea:focus { border-color: var(--accent); }
.rating-reason-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============ Footer ============ */
/* ============ Markdown Section卡片 + 复制本段按钮 ============ */
.md-section {
  position: relative;
  margin: 18px 0;
  padding: 4px 0 0;
  border-top: 1px solid var(--input-border);
}
.md-section:first-child { border-top: none; padding-top: 0; }
.md-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
}
.md-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.md-copy-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s ease;
}
.md-copy-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.md-copy-btn.is-success {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Markdown 表格 */
.md-table-wrap {
  overflow-x: auto;
  margin: 10px 0 16px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
}
.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--input-bg);
}
.md-table th, .md-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--input-border);
  vertical-align: top;
}
.md-table th {
  font-weight: 600;
  background: var(--hint-bg, rgba(0,0,0,0.02));
  color: var(--text-primary);
}
.md-table tr:last-child td { border-bottom: none; }
@media (max-width: 640px) {
  .md-table { font-size: 12.5px; }
  .md-table th, .md-table td { padding: 6px 8px; }
}

.toggle-field {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--hint-bg, rgba(0,0,0,0.02));
  border: 1px solid var(--input-border);
  border-radius: 10px;
  cursor: pointer;
}
.toggle-field input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--brand);
  width: 16px; height: 16px;
}
.toggle-field .toggle-label { display: flex; flex-direction: column; gap: 4px; }
.toggle-field .toggle-label b { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.toggle-field .toggle-label .hint { font-size: 12.5px; color: var(--text-muted); }
.input-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}
.input-hint.warn {
  color: #c2410c;
  background: rgba(255, 159, 10, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.app-legal {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 16px 18px;
  color: var(--text-muted);
  font-size: 11.5px;
  letter-spacing: 0;
  line-height: 1.6;
  opacity: .75;
}
.app-legal .legal-line { display: block; }
.app-legal .legal-line + .legal-line { margin-top: 2px; }
.app-legal b { color: var(--text-secondary); font-weight: 600; }
.app-legal .advisor-qr-trigger { white-space: nowrap; }
@media (max-width: 640px) {
  .app-legal { padding: 0 12px 14px; font-size: 11px; }
}
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 16px 32px;
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: 0;
}
.footer .powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: none;
  backdrop-filter: none;
}
.footer .powered b {
  color: var(--text-secondary);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  font-weight: 600;
  letter-spacing: 0;
}
.footer .dot { display: none; }
.footer-meta {
  margin-top: 8px;
  font-size: 11px;
  opacity: .8;
  letter-spacing: 0;
}

/* ============ Mobile ============ */
@media (max-width: 640px) {
  .topbar-inner { gap: 12px; }
  .brand h1 { font-size: 15px; }
  .tagline { font-size: 11.5px; }
  .logo-badge { width: 32px; height: 32px; font-size: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; justify-content: center; }
  .result-head { flex-direction: column; align-items: stretch; }
  .result-actions { width: 100%; }
  .result-actions .btn { flex: 1; justify-content: center; }
}

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

/* "必填" 浅灰徽章替代红色星号 */
.req {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--hint-bg);
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0;
}
.label i { display: none; }

/* hint 进一步降权 */
.hint {
  background: transparent;
  padding: 4px 0 0 0;
  border-radius: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.hint.active { color: var(--text-secondary); }
.hint b { color: var(--text-primary); }

/* ============ P1 \u8c03\u4f18 ============ */
:root[data-theme="light"] { --accent: #2d7a4a; --accent-text: #2d7a4a; --accent-soft: rgba(45, 122, 74, 0.10); --code-bg: rgba(45, 122, 74, 0.10); }
:root[data-theme="dark"] { --accent: #34c759; --accent-text: #34c759; --accent-soft: rgba(52, 199, 89, 0.16); --code-bg: rgba(52, 199, 89, 0.14); }

/* \u5378\u9664\u5fc5\u586b\u5fbd\u7ae0\u6837\u5f0f */
.req { display: none !important; }
.opt-tag { display: none !important; }

/* \u5361\u7247\u5185\u8fb9\u8ddd + \u5b57\u6bb5\u95f4\u8ddd */
.card { padding: clamp(28px, 4vw, 40px); }
.form-grid { gap: 18px 14px; }
.field { gap: 7px; }
.card-title { margin-bottom: 24px; }

/* \u9876\u680f\u66f4\u8584 */
.topbar { padding: 12px clamp(16px, 4vw, 36px); }
.brand { gap: 10px; }
.logo-badge { width: 32px; height: 32px; border-radius: 8px; }

/* \u5e95\u90e8\u53d6\u6d88\u5360\u5730 */
.footer { padding: 16px; }

/* ============ \u6700\u540e\u4e24\u5200\uff1a\u5fae\u89c2\u5bf9\u6bd4 ============ */
/* label \u5c0f\u4e00\u53f7\u3001\u8272\u9636\u8c03\u4f4e\u3001weight 500\uff1binput 15px\u3001weight 400 */
.label {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0;
}
input[type="text"], input[type="number"], input[type="email"],
input[type="tel"], input[type="search"], input[type="url"], input[type="password"],
input.input, input:not([type]),
select, textarea {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
}

/* \u5361\u7247 hairline border */
:root[data-theme="light"] .card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}
:root[data-theme="dark"] .card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* \u4e0b\u62c9 chevron \u66f4\u7ec6\u66f4\u6dfa */
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2386868b' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>");
}

/* logo \u4e0e\u6807\u9898\u95f4\u8ddd */
.brand { gap: 12px; }

/* container \u66f4\u7a84\uff0c\u89c6\u89c9\u5bf9\u4e2d */
.container { max-width: 700px; }

/* \u6697\u8272\u6a21\u5f0f\uff1a\u5e95\u8272\u4e0d\u662f\u7eaf\u9ed1\uff0c\u5361\u7247\u62ac\u4e00\u7ea7 */
:root[data-theme="dark"] {
  --bg: #1c1c1e;
  --bg-elev: #2c2c2e;
  --surface: rgba(44, 44, 46, 0.78);
  --surface-2: rgba(58, 58, 60, 0.7);
  --input-bg: rgba(58, 58, 60, 0.5);
  --input-border: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --text-primary: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.62);
  --text-muted: rgba(235, 235, 245, 0.42);
  --hint-bg: rgba(255, 255, 255, 0.06);
  --result-bg: rgba(58, 58, 60, 0.4);
  --shadow-card: 0 0 0 0.5px rgba(255,255,255,0.06) inset, 0 24px 60px rgba(0,0,0,0.4);
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(60vw 50vw at 80% -10%, rgba(48, 209, 88, 0.06), transparent 70%),
    radial-gradient(50vw 40vw at -10% 100%, rgba(0, 122, 255, 0.04), transparent 70%);
}

/* ============ Logo \u56fe\u7247 ============ */
.logo-badge {
  background: transparent;
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
}
.logo-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.logo-emoji { display: none; }

/* \u957f\u6807\u9898\u5fae\u8c03 */
.brand h1 {
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.3;
}

/* ============ 用户菜单 ============ */
.user-menu {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--hint-bg);
  font-size: 12.5px;
  color: var(--text-secondary);
}
.user-name { color: var(--text-primary); font-weight: 500; }
.user-link {
  background: none; border: none; padding: 0;
  color: var(--accent); font-size: 12.5px;
  cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.user-link:hover { opacity: 0.7; }
@media (max-width: 640px) {
  .user-menu { gap: 8px; padding: 3px 10px; font-size: 11.5px; }
}



/* ============ 通用：屏蔽浏览器密码 UI 注入 ============ */
input.pw-input {
  -webkit-text-security: disc;
  text-security: disc;
  font-family: text-security-disc, "PingFang SC", -apple-system, sans-serif;
  letter-spacing: 0.05em;
}
input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button,
input::-webkit-strong-password-generation-button,
input::-webkit-contacts-auto-fill-button,
input::-webkit-list-button,
input::-webkit-clear-button,
input::-webkit-caps-lock-indicator {
  position: absolute !important;
  right: -9999px !important;
  display: none !important;
  width: 0 !important; height: 0 !important;
  margin: 0 !important; padding: 0 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* ============ HTML5 hidden 属性全局修复 ============ */
/* flex/grid 子项会覆盖默认 hidden 语义，必须强制 */
[hidden] { display: none !important; }

/* ============ Chrome / Safari autofill 背景覆盖 ============ */
/* 使用不透明色覆盖全部 input/select/textarea 的 autofill 状态 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 9999px var(--autofill-bg) inset !important;
  box-shadow: 0 0 0 9999px var(--autofill-bg) inset !important;
  -webkit-text-fill-color: var(--autofill-text) !important;
  caret-color: var(--autofill-text) !important;
  background-clip: content-box !important;
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s !important;
}


/* === 今日选题推荐（v3.7） === */
.topics-card { margin-bottom: 18px; }
.topics-head {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.topics-head .card-title { margin: 0; }
.topics-tip {
  flex: 1; min-width: 180px;
  font-size: 12.5px; color: var(--text-muted);
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.topic-chip {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border, rgba(120,120,128,0.18));
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  color: var(--text-primary);
  font-family: inherit;
}
.topic-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.topic-chip .topic-main {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  display: flex; gap: 6px; align-items: baseline;
}
.topic-chip .topic-crop {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 8px; border-radius: 6px;
  font-weight: 600;
}
.topic-chip .topic-problem {
  font-size: 14.5px;
  color: var(--text-primary);
  font-weight: 600;
}
.topic-chip .topic-phase {
  font-size: 12px;
  color: var(--text-muted);
}
.topics-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
@media (max-width: 600px) {
  .topics-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ==================== 模块切换器（v3.8 多模块架构）==================== */
.module-tabs-card {
  margin-bottom: 18px;
}
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: var(--card-bg, rgba(255,255,255,.03));
  border: 1px solid var(--card-border, rgba(255,255,255,.08));
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.module-tab {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted, #6c7a89);
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-align: left;
}
.module-tab:hover {
  background: var(--accent-soft, rgba(255,168,0,.08));
  color: var(--text, #1d2939);
}
.module-tab[aria-selected="true"] {
  background: var(--accent, #ffa800);
  color: #fff;
  border-color: var(--accent, #ffa800);
  box-shadow: 0 4px 12px rgba(255,168,0,.25);
}
.module-tab .module-tab-emoji { font-size: 18px; line-height: 1; }
.module-tab .module-tab-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.module-tab .module-tab-name { font-weight: 600; }
.module-tab .module-tab-sub {
  font-size: 11px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-tab[aria-selected="true"] .module-tab-sub { opacity: .9; }

@media (max-width: 720px) {
  .module-tabs { flex-direction: column; }
  .module-tab { min-width: 0; }
}

/* 模块切换时的体验细节：仅显示当前模块的 form-grid */
.module-form[hidden] { display: none !important; }

/* ============ 2026-05-29 顶部品牌区放大 ============ */
.topbar { padding: 16px clamp(18px, 4vw, 40px); }
.topbar-inner { max-width: 1040px; }
.brand { gap: 16px; }
.logo-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}
.brand h1 {
  font-size: clamp(18px, 2.8vw, 23px);
  line-height: 1.25;
  font-weight: 700;
}
.brand-subtitle,
.tagline {
  font-size: 13.5px !important;
  line-height: 1.35;
}
.user-menu {
  gap: 14px;
  padding: 7px 16px;
  font-size: 14px;
}
.user-link {
  font-size: 14px;
  font-weight: 600;
}
.user-name { font-size: 14px; }
.theme-toggle {
  transform: scale(1.08);
  transform-origin: center;
}
.app-legal a {
  color: inherit;
  text-decoration: none;
}
.app-legal a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 640px) {
  .topbar { padding: 14px 14px; }
  .topbar-inner { gap: 10px; }
  .brand { gap: 12px; min-width: 0; }
  .logo-badge { width: 40px; height: 40px; border-radius: 10px; }
  .brand h1 { font-size: 17px; }
  .brand-subtitle,
  .tagline { font-size: 12.5px !important; }
  .user-menu { gap: 9px; padding: 5px 10px; font-size: 12.5px; }
  .user-link, .user-name { font-size: 12.5px; }
  .theme-toggle { transform: scale(1); }
}

/* ============ 2026-05-29 模块分类 Tabs 放大 + 对齐 ============ */
.module-tabs-card {
  margin-bottom: 22px;
}
.module-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  align-items: stretch;
}
.module-tab {
  width: 100%;
  min-width: 0;
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 14px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
}
.module-tab .module-tab-emoji {
  width: 30px;
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}
.module-tab .module-tab-meta {
  flex: 1;
  min-width: 0;
  justify-content: center;
  gap: 4px;
}
.module-tab .module-tab-name {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}
.module-tab .module-tab-sub {
  font-size: 12.5px;
  line-height: 1.25;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 720px) {
  .module-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px;
  }
  .module-tab {
    min-height: 68px;
    padding: 12px 12px;
    gap: 9px;
  }
  .module-tab .module-tab-emoji {
    width: 26px;
    min-width: 26px;
    height: 26px;
    font-size: 21px;
  }
  .module-tab .module-tab-name { font-size: 15px; }
  .module-tab .module-tab-sub { font-size: 11.5px; }
}
@media (max-width: 420px) {
  .module-tabs { grid-template-columns: 1fr; }
}

/* ============ 2026-05-29 移动端头部重排：避免用户菜单被挤成竖排 ============ */
@media (max-width: 640px) {
  .topbar {
    padding: 12px 12px 10px;
  }
  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand theme"
      "menu menu";
    align-items: center;
    gap: 10px 12px;
  }
  .brand {
    grid-area: brand;
    min-width: 0;
    gap: 10px;
  }
  .brand > div {
    min-width: 0;
  }
  .brand h1 {
    font-size: 16px;
    line-height: 1.22;
    max-width: 12.5em;
  }
  .logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .top-right {
    display: contents;
  }
  .theme-toggle {
    grid-area: theme;
    justify-self: end;
    transform: scale(.96);
  }
  .user-menu {
    grid-area: menu;
    justify-self: stretch;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .user-menu::-webkit-scrollbar { display: none; }
  .user-menu .user-name,
  .user-menu .user-link {
    flex: 0 0 auto;
    white-space: nowrap;
    word-break: keep-all;
    line-height: 1.1;
  }
}

@media (max-width: 380px) {
  .brand h1 { font-size: 15px; max-width: 11em; }
  .user-menu { justify-content: flex-start; gap: 12px; }
}

/* ============ v4.0 一级创作类型 Tabs：短视频 / 直播 ============ */
.module-tabs-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.module-group-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.module-group-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: 76px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.module-group-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(70, 184, 130, .42);
  background: rgba(70, 184, 130, .08);
}
.module-group-tab[aria-selected="true"] {
  border-color: rgba(70, 184, 130, .78);
  background: linear-gradient(135deg, rgba(70,184,130,.18), rgba(44,123,229,.10));
  box-shadow: 0 10px 28px rgba(29, 120, 82, .16);
}
.module-group-emoji {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  font-size: 25px;
}
.module-group-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.module-group-name {
  font-size: 18px;
  line-height: 1.18;
  font-weight: 800;
}
.module-group-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .module-group-tabs {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .module-group-tab {
    min-height: 64px;
    padding: 12px 14px;
    border-radius: 15px;
    gap: 11px;
  }
  .module-group-emoji {
    width: 32px;
    min-width: 32px;
    height: 32px;
    font-size: 22px;
  }
  .module-group-name { font-size: 16px; }
  .module-group-sub { font-size: 12px; }
}
.user-quota-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:rgba(0,113,227,.10);color:#0071e3;font-size:12px;font-weight:700;border:1px solid rgba(0,113,227,.18)}

/* ============ v4.1 Apple public + app visual alignment ============ */
:root[data-theme="light"]{--bg:#f5f5f7;--surface:rgba(255,255,255,.78);--surface-2:rgba(255,255,255,.58);--input-bg:#fff;--input-border:rgba(0,0,0,.12);--accent:#0071e3;--accent-soft:rgba(0,113,227,.12);--accent-text:#0071e3;--shadow-card:0 18px 60px rgba(0,0,0,.07),0 1px 0 rgba(255,255,255,.8) inset}:root[data-theme="dark"]{--bg:#111114;--surface:rgba(36,36,40,.78);--surface-2:rgba(48,48,54,.72);--input-bg:rgba(58,58,64,.72);--input-border:rgba(255,255,255,.14);--accent:#0a84ff;--accent-soft:rgba(10,132,255,.18);--accent-text:#64b5ff;--shadow-card:0 22px 70px rgba(0,0,0,.42),0 1px 0 rgba(255,255,255,.06) inset}body{background:var(--bg)!important}.topbar{background:color-mix(in srgb,var(--surface) 86%,transparent)!important;border-bottom:1px solid var(--border)!important;box-shadow:0 1px 0 rgba(255,255,255,.04) inset}.topbar-inner,.container,.container.admin{max-width:1040px!important}.container{padding:28px clamp(18px,4vw,40px) 72px!important}.card,.module-tabs-card{border-radius:24px!important;background:var(--surface)!important;border:1px solid var(--border)!important;box-shadow:var(--shadow-card)!important;backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%)}.card{padding:24px!important}.module-tabs-card{padding:18px!important}.module-group-tab,.module-tab,.topic-chip{background:var(--surface-2)!important;border-color:var(--border)!important;border-radius:18px!important}.module-group-tab[aria-selected="true"],.module-tab[aria-selected="true"]{background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 72%,#60d394 28%))!important;color:#fff!important;border-color:transparent!important;box-shadow:0 14px 34px color-mix(in srgb,var(--accent) 25%,transparent)!important}.module-group-tab:hover,.module-tab:hover,.topic-chip:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--accent) 45%,transparent)!important;background:var(--accent-soft)!important}.module-tabs{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}.form-card .form-grid,.form-grid{gap:18px!important}input[type="text"],input[type="number"],input[type="email"],input[type="tel"],input[type="search"],input[type="url"],input[type="password"],input.input,input:not([type]),select,textarea{border-radius:14px!important;background:var(--input-bg)!important;border-color:var(--input-border)!important;padding:12px 14px!important}input:focus,select:focus,textarea:focus{border-color:var(--accent)!important;box-shadow:0 0 0 4px var(--accent-soft)!important}.btn-primary{border-radius:999px!important;background:var(--accent)!important;color:#fff!important;box-shadow:0 12px 30px color-mix(in srgb,var(--accent) 24%,transparent)!important}.btn-ghost{border-radius:999px!important}.result-body{background:var(--surface-2)!important;border:1px solid var(--border);border-radius:18px;padding:22px}.app-legal{background:color-mix(in srgb,var(--surface) 86%,transparent);border:1px solid var(--border);backdrop-filter:blur(24px)}@media(max-width:720px){.topbar-inner,.container,.container.admin{max-width:100%!important}.container{padding:20px 14px 64px!important}.card{padding:18px!important}}

.system-version{margin-top:8px;color:var(--text-muted);font-size:12px;line-height:1.5;opacity:.78;text-align:center}.app-legal .system-version{margin-top:6px}.footer .system-version,.portal-footer .system-version{display:block}.login-foot .system-version,.public-form-card .system-version,.auth-card .system-version{margin-top:14px}

/* v3.11.3 Lucide-style line icons */
.oc-icon{width:1.15em;height:1.15em;display:block;flex:0 0 auto;stroke:currentColor;fill:none}.module-group-icon,.module-tab-icon,.title-icon{display:inline-flex;align-items:center;justify-content:center;color:currentColor}.module-group-icon{width:42px;height:42px;border-radius:16px;background:var(--accent-soft);color:var(--accent-text)}.module-group-icon .oc-icon{width:22px;height:22px}.module-tab-icon{width:34px;height:34px;border-radius:14px;background:var(--accent-soft);color:var(--accent-text)}.module-tab-icon .oc-icon{width:18px;height:18px}.module-group-tab[aria-selected="true"] .module-group-icon,.module-tab[aria-selected="true"] .module-tab-icon{background:rgba(255,255,255,.22);color:#fff}.card-title{display:flex;align-items:center;gap:10px}.card-title .title-icon,.card-title>.oc-icon{width:30px;height:30px;border-radius:12px;background:var(--accent-soft);color:var(--accent-text);display:inline-flex;align-items:center;justify-content:center}.card-title .title-icon .oc-icon,.card-title>.oc-icon{width:18px;height:18px}.module-group-emoji,.module-tab-emoji{display:none!important}.btn .oc-icon{width:16px;height:16px}@media(max-width:720px){.module-group-icon{width:38px;height:38px}.module-tab-icon{width:32px;height:32px}}


/* ============ 2026-05-30 Header/content alignment + unified icon theme switch ============ */
.topbar-inner {
  width: min(1040px, calc(100vw - 48px));
  max-width: none !important;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 16px !important;
}
.container,
.container.admin {
  width: min(1040px, calc(100vw - 48px));
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.brand {
  min-width: 0;
  align-items: center !important;
}
.brand > div { min-width: 0; }
.brand h1,
.brand-subtitle,
.tagline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-right {
  min-width: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: 12px;
}
.user-menu {
  min-width: 0;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 6px;
}
.user-menu[hidden] { display: none !important; }
.user-name,
.user-link,
.user-quota-pill {
  white-space: nowrap;
  line-height: 1.2;
}
.theme-toggle {
  width: 48px !important;
  min-width: 48px !important;
  height: 30px !important;
  padding: 2px !important;
  border-radius: 999px;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--accent-text);
  font-size: 0 !important;
  line-height: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transform: none !important;
}
.theme-toggle::before,
.theme-toggle::after { content: none !important; display: none !important; }
.theme-toggle .knob {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px;
  transform: none !important;
  order: 0 !important;
  border-radius: 50%;
  background: var(--bg-elev) !important;
  color: var(--accent-text);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.10);
  transition: transform .22s cubic-bezier(.22,.61,.36,1), color .18s ease, background .18s ease;
}
.theme-toggle .knob::before {
  content: '' !important;
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
:root[data-theme="light"] .theme-toggle .knob::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .theme-toggle .knob {
  transform: translateX(18px) !important;
}
:root[data-theme="dark"] .theme-toggle .knob::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.99 13.14A8.99 8.99 0 0 1 10.86 3.01 7 7 0 1 0 20.99 13.14Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.99 13.14A8.99 8.99 0 0 1 10.86 3.01 7 7 0 1 0 20.99 13.14Z'/%3E%3C/svg%3E");
}
.theme-toggle:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)) !important; }
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft);
  border-color: var(--accent) !important;
}
@media (max-width: 640px) {
  .topbar-inner,
  .container,
  .container.admin {
    width: calc(100vw - 28px) !important;
  }
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand theme"
      "menu menu";
    gap: 10px 12px !important;
  }
  .top-right { display: contents !important; }
  .theme-toggle {
    grid-area: theme;
    justify-self: end;
    width: 46px !important;
    min-width: 46px !important;
    height: 29px !important;
  }
  .theme-toggle .knob {
    width: 23px !important;
    height: 23px !important;
    flex-basis: 23px;
  }
  :root[data-theme="dark"] .theme-toggle .knob {
    transform: translateX(17px) !important;
  }
  .user-menu {
    grid-area: menu;
    flex-wrap: nowrap;
    justify-content: center !important;
  }
}

/* ============ 2026-05-30 Fix moon glyph + module tile text alignment ============ */
:root[data-theme="dark"] .theme-toggle .knob::before {
  /* solid crescent mask; avoids broken rendering from open stroke-path SVG masks */
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  -webkit-mask-image: radial-gradient(circle at 66% 34%, transparent 0 5.2px, #000 5.4px);
  mask-image: radial-gradient(circle at 66% 34%, transparent 0 5.2px, #000 5.4px);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.module-group-tabs {
  align-items: stretch;
}
.module-group-tab {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center !important;
  justify-content: start !important;
  column-gap: 16px !important;
  text-align: left !important;
  padding-left: 40px !important;
  padding-right: 28px !important;
}
.module-group-icon,
.module-group-emoji {
  grid-column: 1;
  justify-self: center;
}
.module-group-text {
  grid-column: 2;
  align-items: flex-start !important;
  justify-content: center;
  text-align: left !important;
  width: 100%;
}
.module-group-name,
.module-group-sub {
  text-align: left !important;
  width: 100%;
}
.module-group-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .module-group-tab {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 13px !important;
    padding-left: 18px !important;
    padding-right: 16px !important;
  }
}

/* ============ 2026-05-30 Final hard override: align all module tiles by fixed icon/text columns ============ */
.module-group-tabs,
.module-tabs {
  align-items: stretch !important;
}
.module-group-tab,
.module-tab {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  align-items: center !important;
  justify-items: start !important;
  justify-content: stretch !important;
  column-gap: 14px !important;
  text-align: left !important;
  padding: 16px 20px !important;
}
.module-group-tab {
  min-height: 76px !important;
}
.module-tab {
  min-height: 74px !important;
}
.module-group-icon,
.module-tab-icon,
.module-group-emoji,
.module-tab-emoji {
  grid-column: 1 !important;
  justify-self: center !important;
  align-self: center !important;
  margin: 0 !important;
}
.module-group-icon {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
}
.module-tab-icon {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
}
.module-group-text,
.module-tab-meta {
  grid-column: 2 !important;
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 4px !important;
  margin: 0 !important;
  text-align: left !important;
}
.module-group-name,
.module-group-sub,
.module-tab-name,
.module-tab-sub {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.module-group-name,
.module-tab-name {
  line-height: 1.18 !important;
}
.module-group-sub,
.module-tab-sub {
  line-height: 1.28 !important;
  opacity: .78;
}
@media (max-width: 640px) {
  .module-group-tab,
  .module-tab {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    padding: 13px 15px !important;
  }
  .module-group-icon,
  .module-tab-icon {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
  }
}

.agreement-check { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--text-secondary); line-height:1.5; }
.agreement-check input { margin-top:3px; }
.link-button { border:0; background:none; color:var(--primary); padding:0; cursor:pointer; font:inherit; font-weight:600; }
.agreement-modal .modal-box { max-width:720px; }
.agreement-content { max-height:60vh; overflow:auto; color:var(--text-secondary); font-size:13.5px; line-height:1.75; padding-right:4px; }
.agreement-content h4 { margin:14px 0 6px; color:var(--text-primary); font-size:14px; }
.agreement-content p { margin:0 0 8px; }

/* 企业知识库引用方式 */
.knowledge-mode-panel {
  margin: 2px 0 18px;
  display: grid;
  grid-template-columns: 1fr;
}
.knowledge-mode-panel[hidden] { display: none !important; }
.knowledge-mode-panel .field {
  background: linear-gradient(135deg, rgba(16,185,129,.08), rgba(59,130,246,.06));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.knowledge-mode-panel select { max-width: 360px; }

/* v3.16 facts visualization/editing */
.knowledge-facts-wrap { margin: 12px 0 14px; }
.knowledge-facts-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:10px; }
.knowledge-facts-head h4 { font-size:14px; color:var(--text-primary); }
.knowledge-facts-list { display:grid; gap:10px; max-height:420px; overflow:auto; padding-right:4px; }
.knowledge-fact-card { border:1px solid var(--border); border-radius:12px; background:var(--surface-2); padding:12px; }
.knowledge-fact-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.knowledge-fact-title b { font-size:14px; color:var(--text-primary); }
.knowledge-fact-readonly { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 14px; font-size:12.5px; }
.knowledge-fact-readonly div span { color:var(--text-secondary); }
.knowledge-fact-readonly div b { font-weight:500; color:var(--text-primary); }
.knowledge-fact-edit { border-top:1px solid var(--border); padding-top:10px; margin-top:8px; }
.knowledge-fact-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.knowledge-fact-grid label { display:grid; gap:4px; font-size:12px; color:var(--text-secondary); }
.knowledge-fact-grid textarea.input { min-height:56px; resize:vertical; font-size:12.5px; }
.knowledge-fact-actions { display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap; }
.knowledge-raw { margin-top:10px; }
.knowledge-raw summary { cursor:pointer; color:var(--text-secondary); font-size:13px; margin-bottom:8px; }
@media (max-width: 760px) {
  .knowledge-fact-readonly, .knowledge-fact-grid { grid-template-columns:1fr; }
  .knowledge-facts-head { display:block; }
}
/* v3.17 staged kit + shot references */
.post-script-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0 8px;padding:12px 14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}
.post-script-actions .hint{margin:0;flex:1;min-width:220px}
.refine-panel{width:100%;display:grid;grid-template-columns:minmax(160px,220px) minmax(260px,1fr) auto;gap:12px;align-items:end;padding-top:12px;border-top:1px dashed var(--border)}
.refine-panel .field{margin:0}
.refine-instruction-field textarea{min-height:78px;resize:vertical}
.refine-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;white-space:nowrap}
.me-refine-panel{margin:0 0 16px 0;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}
.me-refine-status{grid-column:1/-1;margin:0}
@media (max-width: 760px){.refine-panel{grid-template-columns:1fr}.refine-actions{justify-content:stretch}.refine-actions .btn{flex:1;justify-content:center}}
.shot-ref-card{margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}
.shot-ref-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}
.shot-ref-head h3{margin:0;font-size:16px;color:var(--text-primary)}
.shot-ref-head span{font-size:12.5px;color:var(--text-secondary)}
.shot-ref-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.shot-ref-item{display:block;text-decoration:none;color:var(--text-primary);border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--surface-2);transition:.15s ease}
.shot-ref-item:hover{transform:translateY(-1px);border-color:var(--accent)}
.shot-thumb{height:92px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--accent-soft),color-mix(in srgb,var(--surface) 70%,var(--accent) 10%));font-size:36px}
.shot-ref-item b{display:block;padding:9px 10px 2px;font-size:13px;line-height:1.35}
.shot-ref-item small{display:block;padding:0 10px 10px;color:var(--text-secondary);font-size:12px}
.shot-ref-sites{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;margin-top:2px}
.shot-ref-sites a{font-size:12.5px;color:var(--accent-text);text-decoration:none;border:1px solid var(--border);border-radius:999px;padding:5px 9px;background:var(--surface-2)}
.shot-thumb{position:relative;overflow:hidden}.shot-thumb img{width:100%;height:100%;object-fit:cover;display:block}.shot-thumb span{position:absolute;inset:0;display:none;align-items:center;justify-content:center}.shot-thumb.is-fallback span{display:flex}.shot-thumb:not(.is-fallback) span{display:none}
.shot-ref-sites a.is-primary{border-color:color-mix(in srgb,var(--accent) 45%,var(--border));background:color-mix(in srgb,var(--accent-soft) 65%,var(--surface-2));font-weight:700}

/* Advisor QR hover card */
.advisor-line { overflow: visible; }
.advisor-qr-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary, #6e6e73);
  font-weight: 600;
  cursor: help;
  outline: none;
}
.advisor-qr-trigger::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 120px;
  height: 18px;
  transform: translateX(-50%);
}
.advisor-qr-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(6px) scale(.98);
  width: 172px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 50;
  color: #1d1d1f;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.advisor-qr-popover::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(255,255,255,.96);
  border-right: 1px solid rgba(0,0,0,.1);
  border-bottom: 1px solid rgba(0,0,0,.1);
}
.advisor-qr-popover img {
  display: block;
  width: 152px;
  height: 152px;
  object-fit: cover;
  border-radius: 12px;
}
.advisor-qr-popover em {
  display: block;
  margin-top: 7px;
  font-style: normal;
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.3;
}
.advisor-qr-trigger:hover .advisor-qr-popover,
.advisor-qr-trigger:focus-visible .advisor-qr-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.portal-footer .advisor-qr-trigger { color: inherit; }
@media (max-width: 640px) {
  .advisor-qr-popover { width: 150px; }
  .advisor-qr-popover img { width: 130px; height: 130px; }
}

/* v3.22.6 enterprise trial modal on creation home */
.modal[hidden]{display:none!important}.modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px}.modal-mask{position:absolute;inset:0;background:rgba(0,0,0,.48);backdrop-filter:blur(8px)}.modal-box{position:relative;width:min(100%,520px);max-height:min(86vh,760px);overflow:auto}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.modal-head h3{margin:0}.module-group-tab[data-group-id="assistant"] .module-group-sub{color:color-mix(in srgb,var(--accent-text) 82%,var(--text-muted))}

/* v3.22.7 clearer two-level module switcher */
.module-switcher{display:grid;gap:14px!important}.module-switch-block{display:grid;gap:10px}.module-switch-label{display:flex;align-items:center;gap:10px;color:var(--text-primary);font-weight:800;letter-spacing:.02em}.module-switch-label span{display:inline-flex;align-items:center;gap:6px}.module-switch-label span::before{content:"";width:8px;height:8px;border-radius:999px;background:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}.module-switch-label em{font-style:normal;font-size:12px;font-weight:500;color:var(--text-muted)}.module-switch-divider{height:1px;background:linear-gradient(90deg,transparent,var(--border),color-mix(in srgb,var(--accent) 30%,var(--border)),var(--border),transparent);margin:2px 4px}.module-switch-secondary{padding:12px;border-radius:20px;background:color-mix(in srgb,var(--surface-2) 78%,transparent);border:1px solid color-mix(in srgb,var(--border) 76%,transparent)}.module-switch-secondary .module-switch-label{font-size:13px;color:var(--text-muted);font-weight:750}.module-switch-secondary .module-switch-label span::before{width:6px;height:6px;background:color-mix(in srgb,var(--accent) 70%,var(--text-muted));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent-soft) 60%,transparent)}.module-switch-primary .module-group-tabs{gap:12px!important}.module-switch-secondary .module-tabs{gap:10px!important}.module-switch-secondary .module-tab{min-height:68px;box-shadow:none!important;background:color-mix(in srgb,var(--surface) 70%,transparent)!important}.module-switch-secondary .module-tab[aria-selected="true"]{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 88%,#fff 12%),color-mix(in srgb,var(--accent) 62%,#60d394 38%))!important}.module-switch-primary .module-group-tab{min-height:82px}.module-switch-primary .module-group-tab[aria-selected="true"]{position:relative}.module-switch-primary .module-group-tab[aria-selected="true"]::after{content:"";position:absolute;left:18px;right:18px;bottom:-8px;height:3px;border-radius:999px;background:var(--accent);box-shadow:0 0 16px color-mix(in srgb,var(--accent) 45%,transparent)}
@media(max-width:720px){.module-switch-secondary{padding:10px}.module-switch-label{align-items:flex-start;flex-direction:column;gap:4px}.module-switch-label span{font-size:13px}.module-switch-label em{font-size:11px}.module-switch-primary .module-group-tab,.module-switch-secondary .module-tab{min-height:auto}}

/* v3.25.2 全站统一导航 + 创作记录侧栏 */
.user-menu .user-link.active{background:rgba(0,122,255,.12);color:var(--primary);border-color:rgba(0,122,255,.22)}
.creator-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}.creator-layout>.creator-history-panel{grid-column:1;grid-row:1 / span 6;position:sticky;top:92px;max-height:calc(100vh - 116px);overflow:auto}.creator-layout>section:not(.creator-history-panel),.creator-layout>.modal,.creator-layout>#toast,.creator-layout>#audit-toast{grid-column:2}.creator-history-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.creator-history-head h2{font-size:18px;margin:0}.creator-history-list{display:grid;gap:8px}.creator-history-item{width:100%;text-align:left;border:1px solid var(--border);background:var(--surface-2);color:var(--text);border-radius:14px;padding:10px 11px;cursor:pointer;transition:.16s ease}.creator-history-item:hover,.creator-history-item.active{border-color:rgba(0,122,255,.58);background:rgba(0,122,255,.08)}.creator-history-item b{display:block;font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.creator-history-item span{display:block;margin-top:5px;color:var(--text-muted);font-size:11.5px;line-height:1.3}.me-status-note{padding:12px 14px;border:1px dashed var(--border);border-radius:14px;background:var(--surface-2);color:var(--text-secondary);line-height:1.6}
@media(max-width:1080px){.creator-layout{display:block}.creator-layout>.creator-history-panel{position:relative;top:auto;max-height:none;margin-bottom:14px}.creator-history-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.creator-history-list{grid-template-columns:1fr}.user-menu{gap:6px}.user-menu .user-link{padding:6px 8px}}

/* v3.25.3 头部信息架构：左侧固定企业平台名，右侧显示登录身份 */
.topbar-inner{grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;min-height:52px!important}.brand{min-width:0!important;align-items:center!important}.brand h1{font-size:clamp(17px,2vw,22px)!important;line-height:1.15!important;font-weight:700!important;letter-spacing:-.03em!important;max-width:100%!important}.brand-subtitle,.tagline{font-size:12.5px!important;line-height:1.35!important;color:var(--text-muted)!important;margin-top:4px!important;max-width:100%!important}.brand .role-tag{display:none!important}.logo-badge{width:42px!important;height:42px!important;border-radius:12px!important;flex:0 0 42px!important}.logo-badge img,.logo-img{max-width:34px!important;max-height:34px!important}.top-right{min-width:0!important}.user-menu{justify-content:flex-end!important;align-items:center!important;gap:8px!important}.shell-role-pill{display:inline-flex;align-items:center;height:30px;padding:0 11px;border-radius:999px;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 24%,transparent);color:var(--accent-text);font-size:12px;font-weight:700;white-space:nowrap}.user-menu .user-name{font-weight:600;color:var(--text-secondary);max-width:9em;overflow:hidden;text-overflow:ellipsis}.user-menu .user-link{height:30px;display:inline-flex;align-items:center}
@media(max-width:860px){.topbar-inner{grid-template-columns:1fr!important;gap:10px!important}.top-right,.user-menu{width:100%;justify-content:flex-start!important}.user-menu{overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:2px}.brand h1{font-size:17px!important}.brand-subtitle{font-size:12px!important}.shell-role-pill,.user-menu .user-name,.user-menu .user-link{flex:0 0 auto}}

/* v3.25.4 头部右侧拆分：导航区 / 身份区 */
.user-menu{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;gap:10px!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important}.shell-nav,.shell-account{height:42px;display:inline-flex;align-items:center;gap:8px;border-radius:999px;background:color-mix(in srgb,var(--surface-2) 82%,transparent);border:1px solid var(--border);box-shadow:0 1px 0 rgba(255,255,255,.08) inset;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.shell-nav{padding:5px 8px}.shell-account{padding:5px 8px 5px 10px}.shell-account:before{content:"";width:1px;height:18px;background:var(--border);margin-right:2px}.shell-account .user-name{font-weight:700;color:var(--text-primary);max-width:10em;overflow:hidden;text-overflow:ellipsis}.shell-role-pill{height:28px;padding:0 10px;background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 34%,transparent)}.shell-logout{color:var(--accent-text)!important;font-weight:700!important}.top-right{gap:12px!important}.theme-toggle{flex:0 0 auto!important}
@media(max-width:980px){.topbar-inner{grid-template-columns:1fr!important}.top-right{width:100%;justify-content:space-between!important}.user-menu{min-width:0;overflow-x:auto;justify-content:flex-start!important;flex:1}.shell-nav,.shell-account{flex:0 0 auto}.shell-account .user-name{max-width:8em}}
@media(max-width:640px){.shell-nav,.shell-account{height:38px}.shell-nav{gap:4px;padding:4px 6px}.shell-account{gap:5px;padding:4px 6px}.shell-account:before{display:none}.shell-role-pill{height:26px;padding:0 8px}.user-menu .user-link{height:28px;padding:0 8px!important}.user-menu .user-name{max-width:7em}}

/* v3.25.6 全站视觉统一：工作台式玻璃卡片 + 具象 emoji icon */
:root[data-theme="light"]{
  --zy-card-glow: rgba(0,113,227,.08);
  --zy-emoji-bg: rgba(0,113,227,.12);
}
:root[data-theme="dark"]{
  --zy-card-glow: rgba(10,132,255,.18);
  --zy-emoji-bg: rgba(10,132,255,.18);
}
.card,.module-tabs-card,.modal-box{
  border-radius:24px!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 94%,transparent),color-mix(in srgb,var(--surface-2) 88%,transparent))!important;
  border:1px solid var(--border)!important;
  box-shadow:var(--shadow-card)!important;
}
.card:hover,.module-tabs-card:hover{
  border-color:color-mix(in srgb,var(--accent) 22%,var(--border))!important;
}
.oc-emoji,.module-group-icon,.module-tab-icon,.title-icon,.card-title-emoji{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.oc-emoji{font-style:normal;line-height:1;font-size:1.22em;filter:saturate(1.12)}
.module-group-icon,.module-tab-icon,.card-title .title-icon,.card-title>.oc-emoji{
  background:var(--zy-emoji-bg)!important;
  color:inherit!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.module-group-icon{width:48px!important;height:48px!important;border-radius:18px!important;font-size:25px!important}
.module-tab-icon{width:38px!important;height:38px!important;border-radius:15px!important;font-size:20px!important}
.card-title{display:flex;align-items:center;gap:10px}
.card-title .title-icon,.card-title>.oc-emoji{width:32px!important;height:32px!important;border-radius:13px!important;font-size:18px!important}
.module-group-tab[aria-selected="true"] .module-group-icon,
.module-tab[aria-selected="true"] .module-tab-icon{background:rgba(255,255,255,.22)!important;color:#fff!important}
.module-group-tab,.module-tab,.topic-chip,.wb-action-card,.wb-quick-box,.stat,.quota-cell,.assistant-mode-pill,.tab{
  border-radius:18px!important;
}
.module-group-tab,.module-tab,.topic-chip,.wb-action-card,.wb-quick-box{
  position:relative;
  overflow:hidden;
}
.module-group-tab::before,.module-tab::before,.wb-action-card::before{
  pointer-events:none;
}
.shell-nav .user-link::before,.shell-account .shell-logout::before{
  margin-right:4px;font-size:1.05em;line-height:1;
}
.shell-nav .user-link[data-nav="workbench"]::before{content:"🏠"}
.shell-nav .user-link[data-nav="create"]::before{content:"🎬"}
.shell-nav .user-link[data-nav="marketing"]::before{content:"📈"}
.shell-nav .user-link[data-nav="agri_assistant"]::before{content:"🌾"}
.shell-nav .user-link[data-nav="assistant"]::before{content:"🌿"}
.shell-nav .user-link[data-nav="me"]::before{content:"👤"}
.shell-nav .user-link[data-nav="admin"]::before{content:"⚙️"}
.shell-account .shell-logout::before{content:"🚪"}

/* 内容创作：具体场景固定均分 4 块，按钮高度统一 */
.module-switch-secondary .module-tabs{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
.module-switch-secondary .module-tab{
  min-width:0!important;
  width:100%!important;
  min-height:116px!important;
  height:100%!important;
  align-items:center!important;
  padding:18px 18px!important;
}
.module-switch-secondary .module-tab .module-tab-meta{height:100%;justify-content:center;gap:7px!important}
.module-switch-secondary .module-tab .module-tab-name{font-size:17px!important;line-height:1.2!important}
.module-switch-secondary .module-tab .module-tab-sub{font-size:12.5px!important;line-height:1.38!important;white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:980px){.module-switch-secondary .module-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}.module-switch-secondary .module-tab{min-height:104px!important}}
@media(max-width:520px){.module-switch-secondary .module-tabs{grid-template-columns:1fr!important}.module-switch-secondary .module-tab{min-height:auto!important}}

/* v3.25.6 hotfix：内容创作具体场景改为 2×2 四宫格，避免 4 列过窄 */
.module-switch-secondary .module-tabs{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.module-switch-secondary .module-tab{
  min-height:120px!important;
}
@media(max-width:620px){.module-switch-secondary .module-tabs{grid-template-columns:1fr!important}.module-switch-secondary .module-tab{min-height:auto!important}}

/* v3.25.7 module switch visual hotfix：高度统一、深色 hover 可读、emoji 去套框 */
.module-switch-primary .module-group-tabs{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:stretch!important;
}
.module-switch-primary .module-group-tab,
.module-switch-secondary .module-tab{
  display:flex!important;
  align-items:center!important;
  min-height:120px!important;
  height:100%!important;
  color:var(--text-primary)!important;
}
.module-switch-primary .module-group-tab{
  padding:18px 22px!important;
}
.module-switch-primary .module-group-tab .module-group-text,
.module-switch-secondary .module-tab .module-tab-meta{
  justify-content:center!important;
  min-width:0!important;
}
.module-switch-primary .module-group-name,
.module-switch-secondary .module-tab-name{
  color:currentColor!important;
  opacity:1!important;
}
.module-switch-primary .module-group-sub,
.module-switch-secondary .module-tab-sub{
  color:color-mix(in srgb,currentColor 72%,transparent)!important;
  opacity:1!important;
}
.module-switch-primary .module-group-tab:hover,
.module-switch-secondary .module-tab:hover{
  color:var(--text-primary)!important;
  background:color-mix(in srgb,var(--surface-2) 88%,var(--accent-soft) 12%)!important;
  border-color:color-mix(in srgb,var(--accent) 48%,var(--border))!important;
}
.module-switch-primary .module-group-tab:hover .module-group-name,
.module-switch-primary .module-group-tab:hover .module-group-sub,
.module-switch-secondary .module-tab:hover .module-tab-name,
.module-switch-secondary .module-tab:hover .module-tab-sub{
  color:var(--text-primary)!important;
  opacity:1!important;
}
.module-switch-primary .module-group-tab[aria-selected="true"],
.module-switch-secondary .module-tab[aria-selected="true"]{
  color:#fff!important;
}
.module-switch-primary .module-group-tab[aria-selected="true"] .module-group-sub,
.module-switch-secondary .module-tab[aria-selected="true"] .module-tab-sub{
  color:rgba(255,255,255,.88)!important;
}
/* emoji 不再套小框：保持具象，但让卡片负责层级 */
.module-group-icon,
.module-tab-icon,
.card-title .title-icon,
.card-title>.oc-emoji{
  background:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
  width:auto!important;
  height:auto!important;
  min-width:1.8em!important;
}
.module-group-icon{font-size:32px!important;margin-right:4px!important}
.module-tab-icon{font-size:27px!important;margin-right:4px!important}
.card-title .title-icon,.card-title>.oc-emoji{font-size:22px!important;min-width:1.4em!important}
.module-group-tab[aria-selected="true"] .module-group-icon,
.module-tab[aria-selected="true"] .module-tab-icon{
  background:transparent!important;
  color:inherit!important;
}
@media(max-width:720px){
  .module-switch-primary .module-group-tabs{grid-template-columns:1fr!important}
  .module-switch-primary .module-group-tab,
  .module-switch-secondary .module-tab{min-height:104px!important}
}
@media(max-width:520px){
  .module-switch-primary .module-group-tab,
  .module-switch-secondary .module-tab{min-height:auto!important}
}

/* v3.25.9 header two-row shell：导航和账号区分两行，保护左侧主标题 */
.topbar-inner{
  grid-template-columns:minmax(280px,1fr) minmax(420px,auto)!important;
  align-items:center!important;
  gap:16px!important;
}
.brand{min-width:0!important;max-width:100%!important}
.brand>div{min-width:0!important;max-width:100%!important}
.brand h1{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  max-width:100%!important;
}
.top-right{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto auto!important;
  grid-template-areas:"menu theme" "menu theme";
  justify-self:end!important;
  align-items:center!important;
  gap:8px 12px!important;
  min-width:0!important;
}
.user-menu{
  grid-area:menu!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  gap:8px!important;
  justify-items:end!important;
  align-items:center!important;
  overflow:visible!important;
  width:auto!important;
  max-width:100%!important;
}
.shell-nav{
  grid-row:1!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  justify-content:flex-end!important;
  scrollbar-width:none!important;
}
.shell-nav::-webkit-scrollbar{display:none!important}
.shell-account{
  grid-row:2!important;
  justify-self:end!important;
  max-width:100%!important;
}
.theme-toggle{
  grid-area:theme!important;
  align-self:center!important;
}
@media(max-width:1100px){
  .topbar-inner{
    grid-template-columns:1fr!important;
    align-items:start!important;
    gap:12px!important;
  }
  .top-right{
    justify-self:stretch!important;
    width:100%!important;
  }
  .user-menu{justify-items:start!important;width:100%!important}
  .shell-nav{justify-content:flex-start!important;max-width:calc(100vw - 112px)!important}
  .shell-account{justify-self:start!important}
}
@media(max-width:640px){
  .top-right{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
  }
  .shell-nav{max-width:calc(100vw - 92px)!important}
  .shell-account{max-width:calc(100vw - 92px)!important;overflow-x:auto!important;scrollbar-width:none!important}
  .shell-account::-webkit-scrollbar{display:none!important}
}

/* v3.25.9 hotfix：窄屏两行头部时，主题按钮贴近账号行，避免右侧孤岛感 */
@media(max-width:1100px){
  .top-right{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"menu" "theme"!important;
    gap:8px!important;
  }
  .theme-toggle{
    grid-area:theme!important;
    justify-self:start!important;
    margin-left:0!important;
  }
}
@media(min-width:641px) and (max-width:1100px){
  .top-right{
    grid-template-columns:minmax(0,auto) auto!important;
    grid-template-areas:"menu theme"!important;
    align-items:end!important;
    justify-content:start!important;
  }
  .theme-toggle{
    grid-area:theme!important;
    align-self:end!important;
    justify-self:start!important;
    margin-bottom:0!important;
  }
}
@media(max-width:640px){
  .top-right{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"menu theme"!important;
    align-items:end!important;
  }
  .theme-toggle{
    grid-area:theme!important;
    align-self:end!important;
    justify-self:end!important;
  }
}

/* v3.25.10 header account de-frame：第二行身份栏去外框，弱化层级 */
.shell-account{
  height:auto!important;
  min-height:30px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  gap:10px!important;
}
.shell-account:before{display:none!important}
.shell-account .user-name{
  color:var(--text-secondary)!important;
  font-weight:650!important;
  max-width:12em!important;
}
.shell-account .shell-logout{
  height:28px!important;
  padding:0 2px!important;
  color:var(--accent-text)!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.shell-role-pill{
  height:28px!important;
  padding:0 10px!important;
  border-radius:999px!important;
  background:var(--accent-soft)!important;
  border:1px solid color-mix(in srgb,var(--accent) 26%,transparent)!important;
  color:var(--accent-text)!important;
}
@media(max-width:640px){
  .shell-account{gap:8px!important}
  .shell-account .user-name{max-width:8em!important}
  .shell-role-pill{height:26px!important;padding:0 8px!important}
}

/* v3.25.11 mobile header fix：移动端独立三行布局，避免导航/身份/主题互相覆盖 */
@media(max-width:640px){
  .topbar{
    padding:10px 12px 12px!important;
  }
  .topbar-inner{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:"brand" "right"!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    align-items:start!important;
  }
  .brand{
    grid-area:brand!important;
    width:100%!important;
    min-width:0!important;
    align-items:center!important;
  }
  .brand h1{
    max-width:calc(100vw - 82px)!important;
    white-space:normal!important;
    overflow:visible!important;
    line-height:1.18!important;
  }
  .brand-subtitle,.tagline{
    max-width:calc(100vw - 82px)!important;
    white-space:normal!important;
  }
  .top-right{
    grid-area:right!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"menu theme"!important;
    align-items:end!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    justify-self:stretch!important;
  }
  .user-menu{
    grid-area:menu!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    justify-items:start!important;
    align-items:start!important;
    overflow:visible!important;
  }
  .shell-nav{
    grid-row:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:38px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
    border-radius:18px!important;
    padding:4px 6px!important;
    scrollbar-width:none!important;
  }
  .shell-nav::-webkit-scrollbar{display:none!important}
  .shell-nav .user-link{
    flex:0 0 auto!important;
    height:28px!important;
    padding:0 8px!important;
    white-space:nowrap!important;
    line-height:28px!important;
  }
  .shell-account{
    grid-row:2!important;
    justify-self:start!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
  .shell-role-pill{
    flex:0 0 auto!important;
    height:26px!important;
    padding:0 8px!important;
  }
  .shell-account .user-name{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .shell-account .shell-logout{
    flex:0 0 auto!important;
    height:26px!important;
    padding:0 2px!important;
    white-space:nowrap!important;
  }
  .theme-toggle{
    grid-area:theme!important;
    align-self:end!important;
    justify-self:end!important;
    width:44px!important;
    height:28px!important;
    transform:none!important;
  }
}

/* v3.28.4 global select affordance: make dropdowns visibly clickable across the site */
select:not([multiple]) {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 44px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%),
    linear-gradient(to bottom, color-mix(in srgb, var(--input-border, rgba(128,128,128,.36)) 86%, transparent), color-mix(in srgb, var(--input-border, rgba(128,128,128,.36)) 86%, transparent)) !important;
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%,
    calc(100% - 38px) 50% !important;
  background-size: 7px 7px, 7px 7px, 1px 24px !important;
  background-repeat: no-repeat !important;
  cursor: pointer;
}
select:not([multiple]):hover {
  border-color: color-mix(in srgb, var(--accent, #0a84ff) 48%, var(--input-border, rgba(128,128,128,.36))) !important;
}
select:not([multiple]):focus {
  border-color: var(--accent, #0a84ff) !important;
}
select:not([multiple]):disabled {
  cursor: not-allowed;
  opacity: .62;
}
