:root {
  --theme-primary: #232529;
  --theme-primary-hover: #17191d;
  --theme-page: #f5f4f5;
  --theme-section: #f0f0f0;
  --theme-card: #fff;
  --theme-card-glass: #ffffffeb;
  --theme-text: #1f2d3d;
  --theme-strong: #17191d;
  --theme-muted: #909399;
  --theme-control-text: #52657d;
  --theme-placeholder: #98a2b1;
  --theme-border: #0000000f;
  --theme-border-strong: #2325291f;
  --theme-input: #f5f4f5;
  --theme-input-border: #e4e4e7;
  --theme-soft: #f5f5f5;
  --theme-soft-hover: #eee;
  --theme-disabled: #f7f8fa;
  --theme-disabled-border: #eaebee;
  --theme-disabled-text: #b1b8c3;
  --theme-shadow-soft: 0 18px 45px #0000000f;
  --theme-shadow-card: 0 12px 30px #0000000d;
  --theme-shadow-control: 0 1px 3px #0000000a;
  --theme-focus: #23252947;
  --theme-danger: #f56c6c;
  --theme-success: #67c23a;
  --theme-radius-sm: 12px;
  --theme-radius-md: 16px;
  --theme-radius-lg: 20px;
  --theme-font: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { color: var(--theme-text); background: var(--theme-page); font-family: var(--theme-font); }
button, input, textarea, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--theme-focus); outline-offset: 3px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { min-width: 28px; min-height: 28px; border: 3px solid transparent; border-radius: 999px; background: #52657d3d; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #52657d6b; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; padding: 0 18px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.button--primary, .button.primary { border: 1px solid var(--theme-primary); color: #fff; background: var(--theme-primary); box-shadow: 0 12px 28px #23252924; }
.button--primary:hover, .button.primary:hover { background: var(--theme-primary-hover); transform: translateY(-1px); }
.button--ghost { border: 0; color: var(--theme-primary); background: transparent; }
.button--ghost:hover { background: #0000000a; }
.button--line, .button.secondary { border: 1px solid var(--theme-border-strong); color: var(--theme-primary); background: #fff; box-shadow: none; }
.button--line:hover, .button.secondary:hover { background: var(--theme-soft); }

/* Existing member login color override. */
body { --bg: var(--theme-page); --panel: var(--theme-card-glass); --ink: var(--theme-text); --muted: var(--theme-muted); --line: var(--theme-border); --soft: var(--theme-soft); --black: var(--theme-primary); --blue: var(--theme-primary); --accent: var(--theme-control-text); --accent-soft: var(--theme-section); --shadow: var(--theme-shadow-soft); --soft-shadow: var(--theme-shadow-card); }
body .login-shell { color: var(--theme-text); background: var(--theme-page); }
.login-panel { border-color: var(--theme-border); border-radius: 20px; background: #fff; box-shadow: var(--theme-shadow-soft); }
.login-card, .plan-card, .member-footer { border-color: var(--theme-border); border-radius: 16px; background: var(--theme-card-glass); box-shadow: var(--theme-shadow-control); }
.login-card { background: #fff; }
.eyebrow { color: var(--theme-control-text); }
.brand-lockup h1, .card-title strong, .member-footer strong, .plan-card li { color: var(--theme-text); }
.brand-lockup p:last-child, .card-title small, .member-footer span, .status { color: var(--theme-muted); }
.scope-label { border-color: var(--theme-border); color: var(--theme-control-text); background: var(--theme-soft); }
.login-card input[type="text"], .login-card input[type="email"], .login-card input[type="password"] { border-color: var(--theme-input-border); border-radius: 14px; color: var(--theme-control-text); background: var(--theme-input); box-shadow: none; }
.login-card input:focus { border-color: var(--theme-primary); box-shadow: none; }
.login-card button { border-color: var(--theme-primary); border-radius: 14px; color: #fff; background: var(--theme-primary); }
.login-card button:hover { background: var(--theme-primary-hover); }
.login-card button.secondary { color: var(--theme-primary); background: #fff; }
.plan-card.pro { background: var(--theme-primary); box-shadow: 0 18px 45px #0000000f; }
.is-embedded-login body { overflow: hidden; background: #fff; }
.is-embedded-login .login-shell { width: 100%; min-height: 0; display: block; padding: 0; background: #fff; }
.is-embedded-login .login-panel { padding: 20px; border: 0; border-radius: 0; box-shadow: none; }
.is-embedded-login .member-head, .is-embedded-login .plan-grid, .is-embedded-login .member-footer { display: none !important; }
.is-embedded-login .member-body { display: block; }
.is-embedded-login .login-card { padding: 0; border: 0; box-shadow: none; }

/* Existing workspace color override. */
body .simple-shell { background: var(--theme-page); color: var(--theme-text); font-family: var(--theme-font); }
body .app-header, body .module-tabs, body .prompt-panel, body .output-panel, body .result-card { background: #fff; }
body .simple-shell textarea, body .simple-shell select, body .simple-shell input { border-color: var(--theme-input-border); border-radius: 14px; color: var(--theme-control-text); background: var(--theme-input); box-shadow: none; }
body .simple-shell textarea::placeholder, body .simple-shell input::placeholder { color: var(--theme-placeholder); }
body .simple-shell textarea:focus, body .simple-shell select:focus, body .simple-shell input:focus { border-color: var(--theme-primary); box-shadow: none; }
body .simple-shell .button { border-radius: 14px; color: var(--theme-primary); background: #fff; box-shadow: none; }
body .simple-shell .button.primary { color: #fff; background: var(--theme-primary); box-shadow: 0 12px 28px #23252924; }
body .simple-shell .button.primary:hover { background: var(--theme-primary-hover); }
body .simple-shell .module-tab, body .simple-shell .mode-switch button { border-color: var(--theme-border); color: var(--theme-muted); background: var(--theme-soft); box-shadow: none; }
body .simple-shell .module-tab:hover, body .simple-shell .mode-switch button:hover { color: var(--theme-text); background: var(--theme-soft-hover); }
body .simple-shell .module-tab.active, body .simple-shell .mode-switch button.active { border-color: var(--theme-border-strong); color: var(--theme-primary); background: #fff; box-shadow: var(--theme-shadow-control); }
body .simple-shell .image-upload, body .simple-shell .detail-upload { border-color: #52657d3d; border-radius: 20px; background: #fff; }
body .simple-shell .image-upload::before, body .simple-shell .detail-upload::before { border-radius: 14px; color: var(--theme-primary); background: var(--theme-soft); box-shadow: none; }
