/* 全局主题层：默认保持原夜间模式，亮色主题由 body.light-theme 启用。 */
:root { --theme-ease: 180ms ease; }
body {
    --ui-page: #0b1020;
    --ui-surface: #151b2d;
    --ui-surface-soft: #111827;
    --ui-text: #f8fafc;
    --ui-text-secondary: #cbd5e1;
    --ui-text-muted: #94a3b8;
    --ui-border: rgba(255,255,255,.10);
    --ui-shadow: 0 16px 40px rgba(0,0,0,.28);
}
body.light-theme {
    --ui-page: #f4f7fc;
    --ui-surface: #ffffff;
    --ui-surface-soft: #f8fafc;
    --ui-text: #172554;
    --ui-text-secondary: #475569;
    --ui-text-muted: #64748b;
    --ui-border: #dbe3ef;
    --ui-shadow: 0 12px 32px rgba(51,65,85,.09);
    --accent-50: #eef2ff;
    --accent-100: #e0e7ff;
    --accent-200: #c7d2fe;
    --accent-300: #a5b4fc;
    --accent-400: #818cf8;
    --accent-500: #6366f1;
    --accent-600: #4f46e5;
    --accent-700: #4338ca;
    --accent-800: #3730a3;
    --accent-focus: rgba(99,102,241,.22);
    --accent-shadow: rgba(79,70,229,.13);
}
body, .navbar, .wrt-page, .lib-page, .home-shell, .rewrite-page, .orders-page {
    transition: background-color var(--theme-ease), color var(--theme-ease), border-color var(--theme-ease), box-shadow var(--theme-ease);
}
.theme-toggle {
    position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 34px;
    padding: 7px 11px 7px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
    background: rgba(255,255,255,.055); color: rgba(255,255,255,.68); font: inherit; font-size: 12px;
    font-weight: 700; cursor: pointer; overflow: hidden;
    transition: color .28s ease, background .28s ease, border-color .28s ease, transform .28s ease, box-shadow .28s ease;
}
.theme-toggle:hover { transform: translateY(-1px); color: #fff; border-color: rgba(165,180,252,.45); box-shadow: 0 8px 20px rgba(99,102,241,.18); }
.theme-toggle:active { transform: translateY(1px) scale(.97); }
.theme-toggle-orbit { position: absolute; width: 23px; height: 23px; left: 5px; top: 5px; border-radius: 50%; background: rgba(251,191,36,.2); filter: blur(1px); transform: scale(.65); opacity: .8; transition: transform .5s cubic-bezier(.16,1,.3,1), background .4s ease, opacity .4s ease; }
.theme-toggle-icon { position: relative; z-index: 1; width: 15px; text-align: center; color: #fbbf24; transition: transform .5s cubic-bezier(.16,1,.3,1), color .3s ease; }
.theme-toggle-label { position: relative; z-index: 1; letter-spacing: .04em; }
.theme-toggle.is-light { background: rgba(255,255,255,.78); border-color: rgba(99,102,241,.18); color: #475569; box-shadow: 0 5px 15px rgba(71,85,105,.08); }
.theme-toggle.is-light .theme-toggle-icon { color: #6366f1; transform: rotate(-18deg); }
.theme-toggle.is-light .theme-toggle-orbit { background: rgba(99,102,241,.13); transform: scale(1.2); opacity: 1; }

/* Theme contract: shared structure, isolated palettes. */
.wrt-title, .lib-header-title, .rewrite-page-title {
    color: var(--ui-text) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: currentColor !important;
}
.wrt-subtitle, .rewrite-page-subtitle { color: var(--ui-text-muted) !important; }

body:not(.light-theme) { color-scheme: dark; background:#080b14; color:#e5e7eb; }
body:not(.light-theme) .main-content { background:#080b14; }
body:not(.light-theme) .rewrite-page-title { color:#f8fafc !important; }
body:not(.light-theme) .rewrite-page-subtitle { color:#94a3b8 !important; }
body:not(.light-theme) .rewrite-editor-card { color:#e5e7eb !important; background:rgba(255,255,255,.035) !important; border-color:rgba(255,255,255,.10) !important; box-shadow:0 12px 34px rgba(0,0,0,.24) !important; }
body:not(.light-theme) .rewrite-result-card { background:rgba(99,102,241,.07) !important; border-color:rgba(129,140,248,.24) !important; }
body:not(.light-theme) .rewrite-panel-label { color:#e2e8f0 !important; }
body:not(.light-theme) .rewrite-muted { color:#94a3b8 !important; }
body:not(.light-theme) .rewrite-placeholder { color:#94a3b8 !important; }
body:not(.light-theme) #originalText { background:#121827 !important; color:#e5e7eb !important; border-color:rgba(148,163,184,.24) !important; }
body:not(.light-theme) #originalText::placeholder { color:#64748b !important; }
body:not(.light-theme) #rewriteContent { background:#12172b !important; color:#e5e7eb !important; border-color:rgba(129,140,248,.28) !important; }
body:not(.light-theme) #rewriteVersionTabs { background:#111827 !important; border-color:rgba(148,163,184,.18) !important; }
body:not(.light-theme) #rewriteVersionTabs button:not(.is-active) { color:#a8b3cf !important; }
body:not(.light-theme) #rewriteVersionTabs button.is-active { background:linear-gradient(135deg,#6366f1,#8b5cf6) !important; color:#fff !important; box-shadow:0 3px 10px rgba(99,102,241,.28) !important; }
body:not(.light-theme) .rewrite-cost-panel { background:#111827 !important; border-color:rgba(148,163,184,.18) !important; }
body:not(.light-theme) .rewrite-clear-btn { background:rgba(239,68,68,.10) !important; border-color:rgba(248,113,113,.26) !important; color:#fca5a5 !important; }
body:not(.light-theme) .rewrite-copy-btn { background:rgba(139,92,246,.12) !important; border-color:rgba(167,139,250,.28) !important; color:#c4b5fd !important; }
body:not(.light-theme) .wrt-type-cost { color:rgba(226,232,240,.52); }
body:not(.light-theme) .wrt-field-placeholder, body:not(.light-theme) .wrt-input::placeholder { color:rgba(148,163,184,.62); }
body:not(.light-theme) .wrt-gen-btn:disabled { opacity:.58; box-shadow:none; }
body:not(.light-theme) .lib-filter { color:rgba(226,232,240,.62); }
body:not(.light-theme) .lib-group-date { color:rgba(203,213,225,.58); }
body:not(.light-theme) .home-intro p, body:not(.light-theme) .home-action p, body:not(.light-theme) .home-utility button { color:rgba(203,213,225,.68); }

body.light-theme { background: #eef3fb; color: #172033; }
body.light-theme .navbar { background: rgba(255,255,255,.82); border-bottom-color: rgba(148,163,184,.22); box-shadow: 0 5px 24px rgba(51,65,85,.08); }
body.light-theme .nav-brand { color: #4f46e5; }
body.light-theme .nav-link { color: #64748b; }
body.light-theme .nav-link:hover { background:var(--accent-50); color:var(--accent-600); }
body.light-theme .nav-link.active { background:var(--accent-50); color:var(--accent-700); box-shadow:inset 0 0 0 1px var(--accent-300); }
body.light-theme .nav-link:focus-visible { outline:3px solid var(--accent-focus); outline-offset:2px; }
body.light-theme .username { color: #475569; }
body.light-theme .nav-toggle { color: #334155; }
body.light-theme .main-content { background: linear-gradient(180deg,#f7faff 0%,#eef3fb 100%); }
body.light-theme .wrt-page, body.light-theme .lib-page, body.light-theme .rewrite-page { background: #f2f6fc !important; }
body.light-theme .wrt-bg, body.light-theme .lib-bg { opacity: .55; filter: saturate(.8); }
body.light-theme .wrt-orb, body.light-theme .lib-orb { opacity: .22; }
body.light-theme .wrt-title, body.light-theme .lib-header-title { background: linear-gradient(135deg,#172554 15%,#6366f1 100%); -webkit-background-clip:text; background-clip:text; }
body.light-theme .wrt-subtitle, body.light-theme .lib-header-sub, body.light-theme .wrt-section-label { color: #64748b !important; }
body.light-theme .wrt-card, body.light-theme .lib-toolbar-card, body.light-theme .lib-doc-card, body.light-theme .rewrite-card, body.light-theme .rewrite-panel { background: rgba(255,255,255,.82) !important; border-color: rgba(148,163,184,.2) !important; box-shadow: 0 10px 30px rgba(51,65,85,.08) !important; }
body.light-theme .wrt-card:hover, body.light-theme .lib-doc-card:hover { box-shadow: 0 18px 38px rgba(79,70,229,.13) !important; }
body.light-theme .wrt-type-card, body.light-theme .wrt-field-display, body.light-theme .wrt-input, body.light-theme .wrt-field-search, body.light-theme .lib-search, body.light-theme textarea, body.light-theme input, body.light-theme select { background: rgba(248,250,252,.9) !important; border-color: rgba(148,163,184,.28) !important; color: #172033 !important; }
body.light-theme .wrt-type-name, body.light-theme .wrt-type-card, body.light-theme .wrt-field-display span:not(.wrt-field-placeholder) { color: #334155; }
body.light-theme .wrt-type-cost, body.light-theme .wrt-field-placeholder, body.light-theme .wrt-input::placeholder, body.light-theme textarea::placeholder { color: #94a3b8 !important; }
body.light-theme .wrt-summary { background: rgba(99,102,241,.07); border-color: rgba(99,102,241,.16); color: #475569; }
body.light-theme .wrt-field-panel { background: rgba(255,255,255,.98); border-color: rgba(148,163,184,.25); box-shadow: 0 18px 45px rgba(51,65,85,.16); }
body.light-theme .wrt-field-item { color: #475569; }
body.light-theme .wrt-field-item:hover { background:#f8faff; color:var(--accent-700); }
body.light-theme .wrt-field-item.active { background:var(--accent-50); color:var(--accent-800); box-shadow:inset 3px 0 0 var(--accent-500); font-weight:700; }
body.light-theme .wrt-hint { color: #94a3b8; }
body.light-theme .home-shell { background: #f4f7fc !important; color: #172033; }
body.light-theme .home-shell .home-focus-main, body.light-theme .home-shell .home-focus-side, body.light-theme .home-shell .home-case, body.light-theme .home-shell .home-step { background: rgba(255,255,255,.82) !important; border-color: rgba(148,163,184,.2) !important; box-shadow: 0 10px 28px rgba(51,65,85,.07); }
body.light-theme .home-shell .home-title, body.light-theme .home-shell .home-focus-title { color: #172033 !important; }
body.light-theme .home-shell .home-sub, body.light-theme .home-shell .home-focus-desc, body.light-theme .home-shell .home-case-desc, body.light-theme .home-shell .home-step-desc { color: #64748b !important; }
@media (max-width: 768px) { .theme-toggle-label { display: none; } .theme-toggle { width: 36px; justify-content: center; padding: 7px; } body.light-theme .nav-menu { background: rgba(255,255,255,.97) !important; border-top-color: rgba(148,163,184,.22); box-shadow: 0 14px 28px rgba(51,65,85,.12) !important; } body.light-theme .nav-link { background: rgba(241,245,249,.72); border-color: rgba(148,163,184,.18); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* AI 创作工作区 */
.wrt-workspace-switch { align-self:center; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,360px); gap:0; padding:4px; border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(255,255,255,.035); box-shadow:none; }
.wrt-workspace-tab { position:relative; display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:7px 12px; border:0; border-radius:10px; background:transparent; color:rgba(255,255,255,.5); text-align:center; cursor:pointer; transition:color 120ms ease,background-color 120ms ease,box-shadow 120ms ease; }
.wrt-workspace-tab:focus { outline:none; }
.wrt-workspace-tab:focus-visible { outline:2px solid rgba(129,140,248,.8); outline-offset:2px; }
.wrt-workspace-tab:hover { color:#fff; background:rgba(255,255,255,.045); }
.wrt-workspace-tab.is-active { color:#fff; background:rgba(99,102,241,.16); box-shadow:inset 0 0 0 1px rgba(129,140,248,.24); }
.wrt-workspace-tab strong { display:block; font-size:13px; margin:0; }
.wrt-workspace-tab small { display:none; }
.wrt-workspace-tab em { position:absolute; top:4px; right:6px; width:5px; height:5px; overflow:hidden; padding:0; border-radius:50%; background:#fbbf24; color:transparent; font-size:0; font-style:normal; }
.wrt-workspace-icon { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; background:rgba(129,140,248,.08); color:#a5b4fc; font-size:12px; }
.wrt-workspace-panel[hidden] { display:none !important; }
.wrt-workspace-panel.is-active { animation:none; }
@keyframes workspaceIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

body.light-theme .wrt-page { background:#f4f7fc !important; }
body.light-theme .wrt-bg { background:radial-gradient(ellipse at 18% 8%,rgba(99,102,241,.12),transparent 52%),linear-gradient(180deg,#f8faff 0%,#eef3fb 100%); }
body.light-theme .wrt-subtitle { color:#64748b; }
body.light-theme .wrt-credits-pill { background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.2); }
body.light-theme .wrt-type-card:hover { background:#f8faff !important; border-color:var(--accent-300) !important; box-shadow:0 7px 18px rgba(51,65,85,.08); }
body.light-theme .wrt-type-card.selected { background:var(--accent-50) !important; border-color:var(--accent-400) !important; box-shadow:0 0 0 1px rgba(99,102,241,.08),0 7px 18px var(--accent-shadow); }
body.light-theme .wrt-type-card:focus-visible { outline:3px solid var(--accent-focus); outline-offset:2px; }
body.light-theme .wrt-type-card.selected .wrt-type-chk { background:var(--accent-600); color:#fff; box-shadow:0 2px 7px rgba(79,70,229,.24); }
body.light-theme .wrt-section-label { color:#475569 !important; }
body.light-theme .wrt-header-kicker { color:#4f46e5; }
body.light-theme .wrt-form-shell, body.light-theme .wrt-checkout { background:rgba(255,255,255,.88); border-color:rgba(148,163,184,.22); box-shadow:0 18px 45px rgba(51,65,85,.09); }
body.light-theme .wrt-form-section + .wrt-form-section, body.light-theme .wrt-advanced, body.light-theme .wrt-checkout-head, body.light-theme .wrt-checkout-list > div, body.light-theme .wrt-checkout-cost, body.light-theme .wrt-checkout-safe { border-color:rgba(148,163,184,.18); }
body.light-theme .wrt-form-section-head h2, body.light-theme .wrt-checkout-head { color:#172033; }
body.light-theme .wrt-form-section-head p, body.light-theme .wrt-control-help, body.light-theme .wrt-advanced summary small, body.light-theme .wrt-checkout-list span, body.light-theme .wrt-checkout-next, body.light-theme .wrt-checkout-safe { color:#64748b; }
body.light-theme .wrt-control-label, body.light-theme .wrt-advanced summary { color:#475569; }
body.light-theme .wrt-checkout-list strong { color:#334155; }
body.light-theme .wrt-checkout-status { color:#64748b; background:#f1f5f9; }
body.light-theme .wrt-checkout-status.is-ready, body.light-theme .wrt-checkout-next.is-ready { color:#15803d; }
body.light-theme .wrt-field-display, body.light-theme .wrt-input { background:#f8fafc !important; }
body.light-theme .wrt-checkout-list > div { background:#f8fafc; border-color:#e2e8f0; }
body.light-theme .wrt-checkout-list > div.is-complete { background:#f5f3ff; border-color:#c4b5fd; }
body:not(.light-theme) .wrt-checkout-cost strong { color:#fbbf24; }

@media (max-width:640px) {
    body.light-theme .wrt-checkout { background:rgba(255,255,255,.97); box-shadow:0 -10px 28px rgba(51,65,85,.14); }
}

/* 浅色主题可读性：覆盖旧页面内联的深色主题文字 */
body.light-theme .rewrite-page-title { color:#172554 !important; background:none !important; -webkit-text-fill-color:currentColor !important; }

/* 文档降重页亮色主题 */
body.light-theme .doc-rewrite-page { color:#172033; background:#f4f7fc; }
body.light-theme .doc-rewrite-bg { opacity:.45; background:radial-gradient(circle at 8% 8%,rgba(99,102,241,.14),transparent 34%),linear-gradient(180deg,#f8faff 0%,#eef3fb 72%); }
body.light-theme .doc-rewrite-header h1, body.light-theme .doc-rewrite-card-title h2, body.light-theme .doc-rewrite-actions-copy h2 { color:#172033; }
body.light-theme .doc-rewrite-header p, body.light-theme .doc-rewrite-card-title p, body.light-theme .doc-rewrite-actions-copy p, body.light-theme .doc-rewrite-note { color:#64748b; }
body.light-theme .doc-rewrite-card { background:rgba(255,255,255,.86); border-color:rgba(148,163,184,.22); box-shadow:0 12px 32px rgba(51,65,85,.08); }
body.light-theme .doc-rewrite-dropzone { background:rgba(99,102,241,.04); border-color:rgba(99,102,241,.35); }
/* Upload controls need an explicit light palette: the base styles are tuned
   for the dark surface and otherwise leave the icons/text too faint on white. */
body.light-theme .doc-rewrite-upload-icon {
    color:#4f46e5;
    background:#e0e7ff;
    box-shadow:inset 0 0 0 1px rgba(79,70,229,.08);
}
body.light-theme .doc-rewrite-dropzone strong,
body.light-theme .doc-rewrite-file-name { color:#334155; }
body.light-theme .doc-rewrite-dropzone small,
body.light-theme .doc-rewrite-file-size { color:#64748b; }
body.light-theme .doc-rewrite-file-info {
    background:#f8faff;
    border-color:#c7d2fe;
}
body.light-theme .doc-rewrite-file-icon { color:#4f46e5; }
body.light-theme .doc-rewrite-file-remove { color:#64748b; }
body.light-theme .doc-rewrite-file-remove:hover { color:#be123c; background:#fff1f2; }
body.light-theme .doc-rewrite-report-dropzone {
    color:#9f1239;
    background:#fff1f2;
    border-color:#fda4af;
}
body.light-theme .doc-rewrite-report-dropzone:hover,
body.light-theme .doc-rewrite-report-dropzone:focus-visible,
body.light-theme .doc-rewrite-report-dropzone.is-dragover {
    background:#ffe4e6;
    border-color:#fb7185;
}
body.light-theme .doc-rewrite-report-icon {
    color:#dc2626;
    background:#fee2e2;
    box-shadow:inset 0 0 0 1px rgba(220,38,38,.08);
}
body.light-theme .doc-rewrite-report-dropzone strong { color:#9f1239; }
body.light-theme .doc-rewrite-report-dropzone small { color:#be123c; }
body.light-theme .doc-rewrite-select { color:#334155; background:#f8fafc; border-color:#cbd5e1; }
body.light-theme .doc-rewrite-entry-btn { color:#4338ca; background:#eef2ff; border-color:#c7d2fe; }
body.light-theme .rewrite-page-subtitle { color:#64748b !important; }
body.light-theme .rewrite-editor-card { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 10px 28px rgba(51,65,85,.08) !important; }
body.light-theme .rewrite-result-card { background:#f8f9ff !important; border-color:#c7d2fe !important; }
body.light-theme .rewrite-panel-label { color:#26324a !important; }
body.light-theme .rewrite-muted { color:#64748b !important; }
body.light-theme .rewrite-placeholder { color:#94a3b8 !important; }
body.light-theme #originalText { background:#fff !important; color:#172033 !important; border-color:#cbd5e1 !important; }
body.light-theme #originalText::placeholder { color:#94a3b8 !important; }
body.light-theme #rewriteContent { background:#f7f8ff !important; color:#172033 !important; border-color:#c7d2fe !important; }
body.light-theme #rewriteVersionTabs { background:#fff !important; border-color:#dbe3ef !important; }
body.light-theme #rewriteVersionTabs button:not(.is-active) { background:transparent !important; color:#64748b !important; box-shadow:none !important; }
body.light-theme #rewriteVersionTabs button:hover:not(.is-active) { background:#f0fdfa !important; color:#0f766e !important; }
body.light-theme #rewriteVersionTabs button.is-active { background:var(--accent-600) !important; color:#fff !important; box-shadow:0 2px 7px rgba(79,70,229,.22) !important; }
body.light-theme #rewriteVersionTabs button:focus-visible { outline:3px solid var(--accent-focus); outline-offset:1px; }
body.light-theme .rewrite-rate-note { color:#64748b; background:#fffbeb; border-color:#fde68a; }
body.light-theme .rewrite-rate-note i,
body.light-theme .rewrite-rate-note strong { color:#b45309; }
body.light-theme .rewrite-ai-commitment { color:#64748b; background:#f8fafc; border-color:#e2e8f0; }
body.light-theme .rewrite-ai-commitment > i { color:#94a3b8; }

body.light-theme .lib-page { background:#f4f7fc !important; }
body.light-theme .lib-header-title { color:#172554 !important; background:none !important; -webkit-text-fill-color:currentColor !important; }
body.light-theme .lib-toolbar-card { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 8px 24px rgba(51,65,85,.07) !important; }
body.light-theme .lib-search { background:#f8fafc !important; color:#172033 !important; border-color:#cbd5e1 !important; }
body.light-theme .lib-search::placeholder { color:#94a3b8 !important; }
body.light-theme .lib-search-icon { color:#64748b !important; }
body.light-theme .lib-filter { background:#fff !important; border-color:#dbe3ef !important; color:#64748b !important; }
body.light-theme .lib-filter:hover { background:#f8faff !important; color:var(--accent-600) !important; border-color:var(--accent-300) !important; }
body.light-theme .lib-filter.active { background:var(--accent-50) !important; border-color:var(--accent-400) !important; color:var(--accent-800) !important; box-shadow:0 0 0 1px rgba(99,102,241,.06); }
body.light-theme .lib-filter:focus-visible { outline:3px solid var(--accent-focus); outline-offset:2px; }
body.light-theme .lib-group { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 8px 24px rgba(51,65,85,.07) !important; }
body.light-theme .lib-credits-label { color:#92400e !important; }
body.light-theme .lib-group-header { background:#f8fafc !important; border-color:#e2e8f0 !important; }
body.light-theme .lib-group-topic { color:#334155 !important; }
body.light-theme .lib-group-date { color:#64748b !important; }
body.light-theme .lib-group-cards { background:#fff !important; }
body.light-theme .lib-card { background:#fff !important; border-color:#e2e8f0 !important; }
body.light-theme .lib-card:hover { background:#f8faff !important; border-color:#c7d2fe !important; box-shadow:0 10px 24px rgba(51,65,85,.08) !important; }
body.light-theme .lib-card-title { color:#172033 !important; }
body.light-theme .lib-card-meta span { color:#64748b !important; }
body.light-theme .lib-card-preview { color:#475569 !important; }
body.light-theme .lib-btn-expand { background:#f8fafc !important; border-color:#cbd5e1 !important; color:#475569 !important; }
body.light-theme .lib-btn-view { background:#eef2ff !important; border-color:#c7d2fe !important; color:#4338ca !important; }
body.light-theme .lib-loading, body.light-theme .lib-empty { color:#64748b !important; }

body.light-theme .wrt-credits-label { color:#92400e !important; }
body.light-theme .wrt-type-card.selected .wrt-type-name { color:var(--accent-800) !important; }
body.light-theme .wrt-type-card.selected .wrt-type-cost { color:var(--accent-600) !important; }
body.light-theme .wrt-gen-btn:disabled {
    background:var(--accent-50) !important;
    border:1px solid var(--accent-300) !important;
    color:var(--accent-700) !important;
    box-shadow:inset 0 0 0 1px rgba(99,102,241,.05) !important;
    opacity:1 !important;
}
body.light-theme .wrt-gen-btn:disabled::after { display:none; }
body.light-theme .wrt-gen-btn:disabled > i { color:var(--accent-500); }
body.light-theme .wrt-checkout-next:not(.is-ready) { color:var(--accent-700); }
body.light-theme .wrt-checkout-next:not(.is-ready) i { color:var(--accent-500); }
body.light-theme .wrt-gen-title-btn { background:#fff; border-color:var(--accent-300); color:var(--accent-700); box-shadow:0 1px 2px rgba(51,65,85,.06); transition:background-color 120ms ease,border-color 120ms ease,color 120ms ease,box-shadow 120ms ease,transform 120ms ease; }
body.light-theme .wrt-gen-title-btn:hover:not(:disabled) { background:var(--accent-50); border-color:var(--accent-500); color:var(--accent-800); box-shadow:0 4px 12px var(--accent-shadow); }
body.light-theme .wrt-gen-title-btn:active:not(:disabled) { background:var(--accent-100); transform:translateY(1px); box-shadow:0 1px 3px rgba(51,65,85,.08); }
body.light-theme .wrt-gen-title-btn:focus-visible { outline:3px solid var(--accent-focus); outline-offset:2px; }
body.light-theme .wrt-gen-title-btn:disabled { background:#f1f5f9; border-color:#d7dfeb; color:#94a3b8; box-shadow:none; opacity:1; }
body.light-theme .wrt-checkout-cost > span { color:#64748b !important; }
.social-hero-card { display:flex; align-items:center; justify-content:space-between; min-height:178px; padding:28px 30px; border:1px solid rgba(129,140,248,.24); border-radius:22px; background:linear-gradient(135deg,rgba(99,102,241,.22),rgba(168,85,247,.15) 55%,rgba(236,72,153,.12)); overflow:hidden; position:relative; }
.social-hero-copy { position:relative; z-index:1; max-width:470px; }
.social-eyebrow { color:#c7d2fe; font-size:10px; font-weight:800; letter-spacing:.16em; }
.social-hero-card h2 { margin:11px 0 8px; color:#fff; font-size:26px; letter-spacing:-.03em; }
.social-hero-card p { margin:0; color:rgba(255,255,255,.62); font-size:13px; line-height:1.8; }
.social-hero-orb { display:grid; place-items:center; width:100px; height:100px; margin-right:24px; border-radius:34px; color:#fff; font-size:32px; background:linear-gradient(135deg,#818cf8,#c084fc); box-shadow:0 18px 44px rgba(129,140,248,.35); transform:rotate(9deg); }
.social-platform-row { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.social-platform { display:flex; flex-direction:column; align-items:flex-start; gap:3px; padding:15px; border:1px solid rgba(255,255,255,.08); border-radius:15px; background:rgba(255,255,255,.035); color:rgba(255,255,255,.58); cursor:pointer; text-align:left; transition:color 120ms ease,background-color 120ms ease,border-color 120ms ease; }
.social-platform span { display:grid; place-items:center; width:30px; height:30px; margin-bottom:3px; border-radius:9px; background:rgba(99,102,241,.1); color:#a5b4fc; font-size:13px; line-height:1; }
.social-platform b { color:inherit; font-size:13px; }
.social-platform small { color:inherit; opacity:.58; font-size:10px; }
.social-platform:hover { border-color:rgba(129,140,248,.32); }
.social-platform.is-active { background:rgba(99,102,241,.16); border-color:rgba(129,140,248,.45); color:#fff; box-shadow:inset 0 0 0 1px rgba(129,140,248,.12); }
.social-grid { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:16px; }
.social-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:16px; }
.social-card-head h3 { margin:4px 0 0; color:#f8fafc; font-size:17px; }
.social-counter,.social-output-status { color:rgba(255,255,255,.38); font-size:11px; white-space:nowrap; }
.social-output-status i { color:#94a3b8; font-size:7px; vertical-align:middle; }
.social-textarea { width:100%; min-height:210px; padding:15px; resize:vertical; border:1px solid rgba(255,255,255,.1); border-radius:13px; background:rgba(255,255,255,.04); color:#f8fafc; outline:none; font:inherit; font-size:13px; line-height:1.8; transition:all .25s ease; }
.social-textarea:focus { border-color:rgba(129,140,248,.55); box-shadow:0 0 0 4px rgba(99,102,241,.1); }
.social-textarea::placeholder { color:rgba(255,255,255,.25); }
.social-goal-row { display:flex; flex-wrap:wrap; gap:7px; margin:14px 0 16px; }
.social-goal { padding:7px 11px; border:1px solid rgba(255,255,255,.1); border-radius:999px; background:rgba(255,255,255,.03); color:rgba(255,255,255,.5); cursor:pointer; font-size:11px; transition:all .2s ease; }
.social-goal.is-active { color:#c7d2fe; background:rgba(99,102,241,.16); border-color:rgba(129,140,248,.38); }
.social-generate-btn { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; min-height:46px; border:0; border-radius:12px; background:#6366f1; color:#fff; font-size:13px; font-weight:800; cursor:pointer; box-shadow:0 8px 18px rgba(99,102,241,.2); transition:background-color 120ms ease,box-shadow 120ms ease; }
.social-generate-btn:hover { background:#4f46e5; box-shadow:0 10px 22px rgba(99,102,241,.26); }
.social-generate-btn small { font-size:10px; opacity:.6; font-weight:500; }
.social-preview { min-height:348px; border:1px dashed rgba(255,255,255,.12); border-radius:14px; background:rgba(4,7,15,.22); }
.social-preview-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:348px; gap:8px; color:rgba(255,255,255,.35); text-align:center; }
.social-empty-icon { display:grid; place-items:center; width:48px; height:48px; margin-bottom:5px; border-radius:15px; color:#a5b4fc; background:rgba(99,102,241,.14); font-size:20px; }
.social-preview-empty strong { color:rgba(255,255,255,.64); font-size:13px; }
.social-preview-empty span { font-size:11px; }
.social-preview-content { padding:20px; color:#e5e7eb; font-size:13px; line-height:1.8; }
.social-preview-platform { color:#a5b4fc; font-size:11px; font-weight:700; }
.social-preview-content h4 { margin:12px 0 9px; color:#fff; font-size:20px; line-height:1.4; }
.social-preview-body { margin-top:14px; color:rgba(255,255,255,.72); overflow-wrap:anywhere; }
.markdown-body { line-height:1.8; }
.markdown-body > :first-child { margin-top:0; }
.markdown-body > :last-child { margin-bottom:0; }
.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6 { margin:1.15em 0 .55em; color:inherit; line-height:1.35; }
.markdown-body h1 { font-size:1.65em; }
.markdown-body h2 { font-size:1.4em; }
.markdown-body h3 { font-size:1.2em; }
.markdown-body p { margin:.7em 0; }
.markdown-body ul,.markdown-body ol { margin:.7em 0; padding-left:1.6em; }
.markdown-body li + li { margin-top:.25em; }
.markdown-body blockquote { margin:.9em 0; padding:.15em 0 .15em 1em; border-left:3px solid rgba(94,210,222,.55); color:rgba(255,255,255,.62); }
.markdown-body code { padding:.12em .38em; border-radius:5px; background:rgba(148,163,184,.14); font-family:Consolas,"SFMono-Regular",monospace; font-size:.92em; }
.markdown-body pre { margin:1em 0; padding:14px 16px; overflow:auto; border:1px solid rgba(148,163,184,.16); border-radius:10px; background:rgba(7,15,26,.58); }
.markdown-body pre code { padding:0; background:none; white-space:pre; }
.markdown-body a { color:#67d7e3; text-decoration:underline; text-underline-offset:3px; }
.markdown-body hr { margin:1.2em 0; border:0; border-top:1px solid rgba(148,163,184,.22); }
.social-preview-tags { margin-top:16px; color:#818cf8; font-size:12px; }
.social-comment { margin-top:15px; padding:10px 12px; border-radius:10px; background:rgba(255,255,255,.05); color:rgba(255,255,255,.58); font-size:11px; }
.social-copy-btn { margin-top:16px; padding:8px 13px; border:1px solid rgba(129,140,248,.32); border-radius:9px; background:rgba(99,102,241,.14); color:#c7d2fe; cursor:pointer; font-size:11px; }
.social-loading-lines { width:min(280px,72%); display:grid; gap:9px; margin-bottom:8px; }
.social-loading-lines span { height:10px; border-radius:6px; background:linear-gradient(90deg,rgba(148,163,184,.1),rgba(148,163,184,.28),rgba(148,163,184,.1)); background-size:200% 100%; animation:social-loading 1.3s ease-in-out infinite; }
.social-loading-lines span:nth-child(2) { width:86%; }
.social-loading-lines span:nth-child(3) { width:94%; }
.social-loading-lines span:nth-child(4) { width:62%; }
@keyframes social-loading { from { background-position:200% 0; } to { background-position:-200% 0; } }
@media (prefers-reduced-motion:reduce) { .social-loading-lines span { animation:none; } }

body.light-theme .wrt-workspace-switch, body.light-theme .social-platform, body.light-theme .social-goal { background:rgba(255,255,255,.74); border-color:rgba(148,163,184,.18); color:#64748b; }
body.light-theme .wrt-workspace-tab.is-active, body.light-theme .social-platform.is-active { background:var(--accent-50); border-color:var(--accent-400); color:var(--accent-800); box-shadow:inset 0 0 0 1px var(--accent-300),0 2px 7px rgba(51,65,85,.06); }
body.light-theme .wrt-workspace-tab:hover:not(.is-active) { color:var(--accent-700); background:#f8faff; }
body.light-theme .wrt-workspace-tab.is-active strong { color:var(--accent-800); }
body.light-theme .wrt-workspace-tab.is-active .wrt-workspace-icon { background:var(--accent-100); color:var(--accent-700); }
body.light-theme .social-platform:hover:not(.is-active) { background:#f8faff; border-color:var(--accent-300); color:var(--accent-700); }
body.light-theme .social-platform:focus-visible, body.light-theme .social-goal:focus-visible { outline:3px solid var(--accent-focus); outline-offset:2px; }
body.light-theme .wrt-workspace-tab { color:#475569; }
body.light-theme .wrt-workspace-tab strong { color:#334155; }
body.light-theme .wrt-workspace-tab small { color:#64748b; opacity:1; }
body.light-theme .wrt-workspace-icon { background:rgba(99,102,241,.09); color:#6366f1; }
body.light-theme .social-hero-card { background:linear-gradient(135deg,#e8eaff,#f1eafe 55%,#fce7f3); border-color:rgba(99,102,241,.16); }
body.light-theme .social-eyebrow { color:#6366f1; }
body.light-theme .social-hero-card h2 { color:#172554; }
body.light-theme .social-hero-card p { color:#64748b; }
body.light-theme .social-card-head h3 { color:#172033; }
body.light-theme .social-counter, body.light-theme .social-output-status { color:#94a3b8; }
body.light-theme .social-textarea { background:#f8fafc !important; color:#172033 !important; border-color:rgba(148,163,184,.28) !important; }
body.light-theme .social-textarea::placeholder { color:#94a3b8; }
body.light-theme .social-goal:hover:not(.is-active) { background:#f8faff; border-color:var(--accent-300); color:var(--accent-700); }
body.light-theme .social-goal.is-active { background:var(--accent-50); color:var(--accent-800); border-color:var(--accent-400); box-shadow:0 0 0 1px rgba(99,102,241,.06); }
body.light-theme .social-preview { background:#f8fafc; border-color:rgba(148,163,184,.3); }
body.light-theme .social-preview-empty { color:#94a3b8; }
body.light-theme .social-preview-empty strong { color:#475569; }
body.light-theme .social-preview-content { color:#334155; }
body.light-theme .social-preview-content h4 { color:#172033; }
body.light-theme .social-preview-body { color:#475569; }
body.light-theme .markdown-body blockquote { color:#64748b; border-left-color:rgba(14,116,144,.42); }
body.light-theme .markdown-body code { background:rgba(14,116,144,.08); }
body.light-theme .markdown-body pre { border-color:rgba(15,23,42,.1); background:#f6fafb; }
body.light-theme .markdown-body a { color:#0e7490; }
body.light-theme .social-comment { background:#eef2ff; color:#64748b; }
@media (max-width:700px) { .wrt-workspace-switch { grid-template-columns:repeat(2,minmax(0,1fr)); } .social-grid { grid-template-columns:1fr; } .wrt-workspace-tab { min-height:44px; } .social-hero-card { padding:22px; } .social-hero-orb { width:68px; height:68px; margin-right:0; font-size:22px; } .social-platform-row { grid-template-columns:repeat(2,1fr); } }

/* 社交发布：单一工作台布局 */
.social-workbench { display:flex; flex-direction:column; gap:16px; width:min(1072px,calc(100vw - 48px)); margin-left:50%; transform:translateX(-50%); }
.social-workbench-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding:20px 24px; border:1px solid rgba(255,255,255,.08); border-radius:20px; background:rgba(255,255,255,.035); box-shadow:0 12px 30px rgba(0,0,0,.12); }
.social-workbench-head h2 { margin:0 0 5px; color:#fff; font-size:24px; letter-spacing:-.03em; }
.social-workbench-head p { max-width:650px; margin:0; color:rgba(255,255,255,.55); font-size:12px; line-height:1.7; }
.social-stepper { display:flex; align-items:center; gap:9px; color:rgba(255,255,255,.38); font-size:11px; white-space:nowrap; }
.social-stepper span { padding:7px 10px; border-radius:999px; background:rgba(255,255,255,.05); }
.social-stepper span.is-active { color:#c7d2fe; background:rgba(99,102,241,.22); }
.social-stepper i { font-size:9px; opacity:.55; }
.social-workbench-main { display:grid; grid-template-columns:minmax(0,.93fr) minmax(0,1.07fr); gap:16px; }
.social-workbench .social-platform-row { grid-template-columns:repeat(4,minmax(0,1fr)); }
.social-input-panel, .social-output-panel { min-width:0; padding:24px; border:1px solid rgba(255,255,255,.08); border-radius:20px; background:rgba(255,255,255,.035); box-shadow:0 12px 30px rgba(0,0,0,.12); }
.social-field-label { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:9px; color:#f8fafc; font-size:12px; font-weight:800; }
.social-field-label small { color:rgba(255,255,255,.35); font-size:10px; font-weight:500; }
.social-material-label { margin-top:20px; }
.social-platform-row { margin-bottom:0; }
.social-textarea { min-height:170px; }
.social-input-meta { display:flex; align-items:center; gap:9px; min-height:30px; margin-top:8px; color:rgba(255,255,255,.34); font-size:10px; }
.social-input-meta .social-counter { margin-left:auto; }
.social-requirements { width:100%; padding:11px 12px; border:1px solid rgba(255,255,255,.1); border-radius:11px; background:rgba(255,255,255,.035); color:#f8fafc; outline:none; font:inherit; font-size:12px; }
.social-requirements:focus { border-color:rgba(129,140,248,.55); box-shadow:0 0 0 4px rgba(99,102,241,.1); }
.social-requirements::placeholder { color:rgba(255,255,255,.27); }
.social-goal-label { margin-top:18px; }
.social-generate-btn:disabled { cursor:not-allowed; opacity:.45; transform:none; box-shadow:none; }
.social-generate-hint { margin:8px 0 0; color:rgba(255,255,255,.32); font-size:10px; text-align:center; }
.social-output-panel .social-card-head { margin-bottom:14px; }
.social-output-panel .social-preview { min-height:400px; }

body.light-theme .social-workbench-head { background:rgba(255,255,255,.84); border-color:rgba(148,163,184,.2); box-shadow:0 10px 28px rgba(51,65,85,.07); }
body.light-theme .social-workbench-head h2 { color:#172033; }
body.light-theme .social-workbench-head p { color:#64748b; }
body.light-theme .social-stepper { color:#94a3b8; }
body.light-theme .social-stepper span { background:rgba(255,255,255,.62); }
body.light-theme .social-stepper span.is-active { color:var(--accent-800); background:var(--accent-50); box-shadow:inset 0 0 0 1px var(--accent-200); }
body.light-theme .social-input-panel, body.light-theme .social-output-panel { background:rgba(255,255,255,.84); border-color:rgba(148,163,184,.2); box-shadow:0 10px 28px rgba(51,65,85,.07); }
body.light-theme .social-field-label { color:#334155; }
body.light-theme .social-field-label small { color:#94a3b8; }
body.light-theme .social-input-meta { color:#94a3b8; }
body.light-theme .social-platform span { background:#eef2ff; color:#4f46e5; }
body.light-theme .social-requirements { background:#f8fafc; color:#172033; border-color:rgba(148,163,184,.28); }
body.light-theme .social-requirements::placeholder { color:#94a3b8; }
body.light-theme .social-generate-hint { color:#94a3b8; }
body.light-theme .otab:not(.on) { background:#fff; color:#64748b; border:1px solid #dbe3ef; }
body.light-theme .otab:not(.on):hover { background:#f8faff; color:var(--accent-700); border-color:var(--accent-300); }
body.light-theme .otab.on { background:var(--accent-600); color:#fff; box-shadow:0 3px 10px rgba(79,70,229,.22); }
body.light-theme .otab:focus-visible { outline:3px solid var(--accent-focus); outline-offset:2px; }
body.light-theme .auth-tab.active { color:var(--accent-700); }
body.light-theme .auth-tab.active::after { background:var(--accent-600); }

/* 订单与个人中心：结构共享，浅色与深色完全分层 */
.orders-page,.profile-page { font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; }
.orders-primary-btn { min-height:42px; padding:10px 22px; border:1px solid #50bdd2; border-radius:11px; background:#69d2e7; color:#112b46; font:inherit; font-size:14px; font-weight:700; cursor:pointer; transition:transform 140ms ease,background-color 140ms ease,box-shadow 140ms ease; }
.orders-primary-btn:hover { transform:translateY(-1px); background:#5bc7dc; box-shadow:0 8px 20px rgba(31,111,126,.24); }
.orders-primary-btn:focus-visible,.profile-action:focus-visible,.profile-submit-btn:focus-visible,.profile-logout-btn:focus-visible { outline:3px solid rgba(129,140,248,.35); outline-offset:2px; }
.order-status { display:inline-flex; align-items:center; min-height:24px; padding:2px 10px; border:1px solid transparent; border-radius:999px; font-size:11px; font-weight:700; }
.order-status.status-completed { background:rgba(16,185,129,.15); border-color:rgba(16,185,129,.3); color:#34d399; }
.order-status.status-processing { background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.3); color:#fbbf24; }
.order-status.status-failed { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.3); color:#f87171; }
.order-status.status-pending { background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.1); color:rgba(255,255,255,.52); }
.profile-action { width:100%; transition:transform 140ms ease,border-color 140ms ease,background-color 140ms ease,box-shadow 140ms ease; }
.profile-action:hover { transform:translateY(-1px); }
.profile-logout-btn:hover { background:rgba(239,68,68,.16) !important; }

body.light-theme .orders-page,body.light-theme .profile-page { background:#f7faff !important; color:#172033; }
body.light-theme .orders-bg,body.light-theme .orders-orb,body.light-theme .profile-bg,body.light-theme .profile-orb { display:none; }
body.light-theme .orders-eyebrow,body.light-theme .profile-eyebrow { background:#eff6ff !important; border-color:#bfdbfe !important; color:#1d4ed8 !important; letter-spacing:.08em !important; }
body.light-theme .orders-eyebrow span,body.light-theme .profile-eyebrow span { background:var(--accent-600) !important; box-shadow:none !important; }
body.light-theme .orders-title,body.light-theme .profile-title { background:none !important; color:#172033 !important; -webkit-background-clip:initial !important; -webkit-text-fill-color:#172033 !important; background-clip:initial !important; }
body.light-theme .orders-subtitle { color:#64748b !important; }
body.light-theme .orders-credits,body.light-theme .profile-credits { background:#fffbeb !important; border-color:#fde68a !important; color:#b45309 !important; }
body.light-theme .orders-credits-label,body.light-theme .profile-credits-label { color:#92400e !important; }
body.light-theme .orders-state,body.light-theme .orders-empty-text,body.light-theme .orders-recharge-intro { color:#64748b !important; }
body.light-theme .order-card { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 8px 24px rgba(30,41,59,.06); }
body.light-theme .order-card-title { color:#172033 !important; }
body.light-theme .order-card-meta,body.light-theme .order-points-label { color:#64748b !important; }
body.light-theme .order-points-pending { color:#475569 !important; }
body.light-theme .order-points-value:not(.is-positive) { color:var(--accent-700) !important; }
body.light-theme .order-points-value.is-positive { color:#047857 !important; }
body.light-theme .order-status.status-completed { background:#ecfdf5; border-color:#a7f3d0; color:#047857; }
body.light-theme .order-status.status-processing { background:#fffbeb; border-color:#fde68a; color:#b45309; }
body.light-theme .order-status.status-failed { background:#fff1f2; border-color:#fecdd3; color:#be123c; }
body.light-theme .order-status.status-pending { background:#eff6ff; border-color:#bfdbfe; color:#1d4ed8; }
body.light-theme .orders-info-card { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 8px 24px rgba(30,41,59,.06); }
body.light-theme .orders-info-title { color:#172033 !important; }
body.light-theme .orders-info-grid { color:#475569 !important; }
body.light-theme .orders-info-accent { border-top-color:#dbe3ef !important; color:var(--accent-700) !important; }
body.light-theme .pkgcard { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 9px 26px rgba(30,41,59,.07) !important; backdrop-filter:none; }
body.light-theme .pkgcard:hover { background:#fff !important; border-color:var(--accent-300) !important; box-shadow:0 16px 36px rgba(79,70,229,.12) !important; }
body.light-theme .pkgcard.popular { background:#fff !important; border-color:var(--accent-400) !important; box-shadow:0 12px 30px rgba(79,70,229,.12) !important; }
body.light-theme .pkgcard.free-card { background:#fff !important; border-color:#6ee7b7 !important; }
body.light-theme .pkgcard.free-card:hover { background:#fff !important; border-color:#34d399 !important; box-shadow:0 16px 36px rgba(5,150,105,.12) !important; }
body.light-theme .pkg-name,body.light-theme .pkg-price.paid { color:#172033 !important; }
body.light-theme .pkg-credits-num { color:var(--accent-700) !important; }
body.light-theme .pkg-credits-label,body.light-theme .pkg-desc { color:#64748b !important; }
body.light-theme .pkg-divider { background:#dbe3ef !important; }
body.light-theme .pkg-tag.hot,body.light-theme .pkg-buy-btn.primary { background:var(--accent-600) !important; }
body.light-theme .pkg-buy-btn.used { background:#eff6ff !important; color:#3b82f6 !important; border:1px solid #bfdbfe !important; }

body.light-theme .profile-hero { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 12px 30px rgba(30,41,59,.08) !important; }
body.light-theme .profile-hero::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--accent-600); }
body.light-theme .profile-hero-decoration { display:none; }
body.light-theme .profile-avatar { background:var(--accent-600) !important; border-color:#fff !important; box-shadow:0 4px 14px rgba(79,70,229,.22) !important; }
body.light-theme .profile-user-name { color:#172033 !important; }
body.light-theme .profile-user-meta { color:#64748b !important; }
body.light-theme .profile-user-joined { color:#94a3b8 !important; }
body.light-theme .profile-card { background:#fff !important; border-color:#dbe3ef !important; box-shadow:0 9px 26px rgba(30,41,59,.06) !important; }
body.light-theme .profile-card-title,body.light-theme .profile-item-title { color:#172033 !important; }
body.light-theme .profile-badge { background:var(--accent-50) !important; border-color:var(--accent-200) !important; color:var(--accent-700) !important; }
body.light-theme .profile-list { color:#475569 !important; }
body.light-theme .profile-list-item,body.light-theme .profile-help-item { background:#fff !important; border-color:#e2e8f0 !important; }
body.light-theme .profile-list-item span { color:#172033 !important; }
body.light-theme .profile-item-copy { color:#64748b !important; }
body.light-theme .profile-note { background:#eff6ff !important; border-color:#bfdbfe !important; color:#1e40af !important; }
body.light-theme .profile-action-primary { background:var(--accent-600) !important; box-shadow:0 6px 16px rgba(79,70,229,.18); }
body.light-theme .profile-action-accent { background:#fff !important; color:var(--accent-700) !important; border-color:var(--accent-300) !important; }
body.light-theme .profile-action-secondary { background:#fff !important; color:#334155 !important; border-color:#dbe3ef !important; }
body.light-theme .profile-action-accent:hover,body.light-theme .profile-action-secondary:hover { background:var(--accent-50) !important; border-color:var(--accent-300) !important; color:var(--accent-800) !important; box-shadow:0 7px 18px rgba(79,70,229,.08); }
body.light-theme .profile-invite-box { background:#fff !important; }
body.light-theme .profile-invite-own { border-color:var(--accent-300) !important; }
body.light-theme .profile-invite-bind { border-color:#6ee7b7 !important; }
body.light-theme .profile-invite-code { color:var(--accent-700) !important; }
body.light-theme .profile-input { background:#fff !important; border-color:#cbd5e1 !important; color:#172033 !important; }
body.light-theme .profile-input:focus { border-color:var(--accent-400) !important; box-shadow:0 0 0 3px var(--accent-focus); }
body.light-theme .profile-input:disabled { background:#eff6ff !important; color:#3b82f6 !important; border-color:#bfdbfe !important; }
body.light-theme .profile-submit-btn { background:#059669 !important; }
body.light-theme .profile-contact-panel { background:#fff !important; border-color:var(--accent-200) !important; box-shadow:0 16px 42px rgba(30,41,59,.16) !important; }
body.light-theme .profile-contact-label { color:var(--accent-700) !important; text-shadow:none !important; }
body.light-theme .profile-logout-btn { background:#fff1f2 !important; color:#be123c !important; border-color:#fecdd3 !important; }
body.light-theme .profile-logout-btn:hover { background:#ffe4e6 !important; }

@media (max-width:700px) {
  .orders-wrap,.profile-wrap { padding:32px 18px 30px !important; }
  .orders-header { align-items:flex-start !important; flex-direction:column; gap:18px; margin-bottom:24px !important; }
  .orders-tabs { overflow-x:auto; padding-bottom:4px; }
  .otab { flex:0 0 auto; }
  .profile-hero { padding:24px 20px !important; }
  .profile-hero > div:last-child { align-items:flex-start !important; flex-wrap:wrap; }
  .profile-credits { width:100%; display:flex; align-items:baseline; justify-content:center; gap:7px; }
}
@media (max-width:900px) { .social-workbench { width:min(712px,calc(100vw - 48px)); } .social-workbench .social-platform-row { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { .wrt-workspace-switch { grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,320px); } .wrt-workspace-tab { min-height:44px; } .social-workbench { width:100%; margin-left:0; transform:none; } .social-workbench-head { align-items:flex-start; flex-direction:column; padding:22px; } .social-workbench-main { grid-template-columns:1fr; } .social-stepper { width:100%; justify-content:space-between; } .social-input-panel, .social-output-panel { padding:18px; } }

/* 交互状态体系：选中=靛蓝，完成=绿色，费用=琥珀 */
body.light-theme .nav-link { position:relative; border:0; border-radius:10px; }
body.light-theme .nav-link.active { background:#eef2ff; color:#3730a3; box-shadow:none; font-weight:700; }
body.light-theme .nav-link.active::after { content:""; position:absolute; right:15px; bottom:5px; left:15px; height:2px; border-radius:999px; background:#4f46e5; }
body.light-theme .nav-link:hover:not(.active) { background:#f7faff; color:#4f46e5; }

body.light-theme .wrt-workspace-switch { padding:4px; background:#fff; border-color:#dbe3ef; box-shadow:0 5px 16px rgba(30,41,59,.06); }
body.light-theme .wrt-workspace-tab { border:0; color:#64748b; }
body.light-theme .wrt-workspace-tab.is-active { background:#4f46e5; color:#fff; border-color:transparent; box-shadow:0 4px 10px rgba(79,70,229,.22); }
body.light-theme .wrt-workspace-tab.is-active strong { color:#fff; }
body.light-theme .wrt-workspace-tab.is-active .wrt-workspace-icon { background:rgba(255,255,255,.18); color:#fff; }
body.light-theme .wrt-workspace-tab:hover:not(.is-active) { background:#f7faff; color:#4338ca; }

body.light-theme .wrt-type-card { background:#fff !important; border-color:#dbe3ef !important; box-shadow:none; }
body.light-theme .wrt-type-card:hover:not(.selected) { background:#f8fbff !important; border-color:#a5b4fc !important; box-shadow:0 6px 16px rgba(30,41,59,.06); transform:translateY(-1px); }
body.light-theme .wrt-type-card.selected { background:#fff !important; border-color:#4f46e5 !important; box-shadow:inset 0 0 0 1px #4f46e5,0 8px 20px rgba(79,70,229,.10); transform:none; }
body.light-theme .wrt-type-card.selected::before { content:none; }
body.light-theme .wrt-type-card.selected .wrt-type-name { color:#312e81 !important; font-weight:800; }
body.light-theme .wrt-type-card.selected .wrt-type-cost { color:#4f46e5 !important; }
body.light-theme .wrt-type-card .wrt-type-chk { top:9px; right:9px; width:20px; height:20px; background:#4f46e5; color:#fff; box-shadow:none; }

.wrt-summary-main,.wrt-summary-meta { display:flex; align-items:center; gap:6px; }
.wrt-summary-icon { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#4f46e5; color:#fff; font-size:10px; }
.wrt-summary-label { font-weight:600; }
body.light-theme .wrt-summary { justify-content:space-between; gap:12px; margin-top:12px; padding:10px 12px; background:#fff; border-color:#dbe3ef; color:#64748b; box-shadow:0 3px 10px rgba(30,41,59,.04); }
body.light-theme .wrt-summary-types { color:#312e81; font-weight:800; }
body.light-theme .wrt-summary-meta { padding-left:12px; border-left:1px solid #e2e8f0; color:#64748b; }
body.light-theme .wrt-summary-cost { color:#d97706; font-size:16px; font-weight:900; }

body.light-theme .wrt-checkout-list > div { background:#fff; border-color:#dbe3ef; }
body.light-theme .wrt-checkout-list > div.is-complete { background:#f0fdf4; border-color:#86efac; box-shadow:none; }
body.light-theme .wrt-checkout-list > div.is-complete .wrt-checkout-item-icon { background:#dcfce7; color:#15803d; }
body.light-theme .wrt-checkout-list > div.is-complete .wrt-checkout-item-copy span { color:#64748b; }
body.light-theme .wrt-checkout-list > div.is-complete .wrt-checkout-item-copy strong { color:#166534; }
body.light-theme .wrt-checkout-status { background:#fff; border:1px solid #dbe3ef; color:#64748b; }
body.light-theme .wrt-checkout-status.is-ready { background:#f0fdf4; border-color:#86efac; color:#15803d; }
body.light-theme .wrt-field-item.active { background:#eef2ff; color:#312e81; box-shadow:none; font-weight:800; }

body.light-theme .social-platform { background:#fff; border-color:#dbe3ef; color:#64748b; box-shadow:none; }
body.light-theme .social-platform.is-active { background:#fff; border-color:#4f46e5; color:#312e81; box-shadow:inset 0 0 0 1px #4f46e5,0 6px 16px rgba(79,70,229,.08); }
body.light-theme .social-platform.is-active span { background:#4f46e5; color:#fff; }
body.light-theme .social-goal { background:#fff; border-color:#dbe3ef; color:#64748b; box-shadow:none; }
body.light-theme .social-goal.is-active { background:#4f46e5; border-color:#4f46e5; color:#fff; box-shadow:0 4px 10px rgba(79,70,229,.18); }

body.light-theme #rewriteVersionTabs button.is-active { background:#4f46e5 !important; color:#fff !important; box-shadow:0 4px 10px rgba(79,70,229,.20) !important; }
body.light-theme .lib-filter.active { background:#4f46e5 !important; border-color:#4f46e5 !important; color:#fff !important; box-shadow:0 4px 10px rgba(79,70,229,.18); }

body:not(.light-theme) .nav-link.active { background:rgba(79,70,229,.16); color:#fff; box-shadow:inset 0 0 0 1px rgba(129,140,248,.28); }
body:not(.light-theme) .wrt-workspace-tab.is-active { background:#4f46e5; color:#fff; box-shadow:0 4px 12px rgba(49,46,129,.28); }
body:not(.light-theme) .wrt-workspace-tab.is-active .wrt-workspace-icon { background:rgba(255,255,255,.16); color:#fff; }
body:not(.light-theme) .wrt-type-card.selected { background:rgba(79,70,229,.10); border-color:#818cf8; box-shadow:inset 0 0 0 1px rgba(129,140,248,.36),0 8px 22px rgba(0,0,0,.22); }
body:not(.light-theme) .wrt-type-card.selected::before { content:none; }
body:not(.light-theme) .wrt-type-card.selected .wrt-type-chk { background:#6366f1; color:#fff; box-shadow:none; }
body:not(.light-theme) .wrt-summary { justify-content:space-between; padding:10px 12px; background:rgba(15,23,42,.72); border-color:rgba(129,140,248,.24); color:#94a3b8; box-shadow:none; }
body:not(.light-theme) .wrt-summary-types { color:#e0e7ff; }
body:not(.light-theme) .wrt-summary-meta { padding-left:12px; border-left:1px solid rgba(148,163,184,.16); }
body:not(.light-theme) .wrt-checkout-list > div.is-complete { background:rgba(34,197,94,.07); border-color:rgba(74,222,128,.35); box-shadow:none; }
body:not(.light-theme) .wrt-checkout-list > div.is-complete .wrt-checkout-item-icon { background:rgba(34,197,94,.12); color:#4ade80; }
body:not(.light-theme) .wrt-field-item.active { background:rgba(79,70,229,.12); color:#e0e7ff; box-shadow:none; font-weight:800; }
body:not(.light-theme) .social-platform.is-active { background:rgba(79,70,229,.11); border-color:#818cf8; color:#fff; box-shadow:inset 0 0 0 1px rgba(129,140,248,.26); }
body:not(.light-theme) .social-platform.is-active span { background:#4f46e5; color:#fff; }
body:not(.light-theme) .social-goal.is-active,body:not(.light-theme) #rewriteVersionTabs button.is-active,body:not(.light-theme) .otab.on { background:#4f46e5 !important; border-color:#4f46e5 !important; color:#fff !important; box-shadow:0 4px 12px rgba(49,46,129,.28) !important; }

@media (max-width:560px) {
  body.light-theme .wrt-summary { align-items:flex-start; flex-direction:column; }
  body.light-theme .wrt-summary-meta { width:100%; padding-top:8px; padding-left:0; border-top:1px solid #e2e8f0; border-left:0; }
}

/* 我的账户：产品化账户控制台 */
.account-page {
  --account-bg:#080b14;
  --account-surface:#111827;
  --account-surface-soft:#151d2d;
  --account-border:rgba(255,255,255,.09);
  --account-border-strong:rgba(148,163,184,.22);
  --account-text:#f8fafc;
  --account-muted:#94a3b8;
  --account-subtle:#64748b;
  --account-accent:#6366f1;
  --account-accent-strong:#4f46e5;
  --account-accent-soft:rgba(99,102,241,.13);
  --account-success:#4ade80;
  --account-success-soft:rgba(34,197,94,.10);
  --account-amber:#fbbf24;
  --account-amber-soft:rgba(245,158,11,.10);
  min-height:calc(100vh - 64px);
  padding:44px 24px 64px;
  background:var(--account-bg);
  color:var(--account-text);
  font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif;
}
.account-page * { box-sizing:border-box; }
.account-page button,.account-page input { font-family:inherit; }
.account-shell { width:min(1060px,100%); margin:0 auto; }
.account-header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:22px; }
.account-kicker { display:block; margin-bottom:7px; color:#818cf8; font-size:12px; font-weight:800; letter-spacing:.12em; }
.account-header h1 { margin:0; color:var(--account-text); font-size:30px; font-weight:800; letter-spacing:-.04em; line-height:1.25; }
.account-header p { margin:8px 0 0; color:var(--account-muted); font-size:13px; line-height:1.6; }
.account-support-wrap { position:relative; flex:0 0 auto; }
.account-support-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:9px 15px; border:1px solid var(--account-border-strong); border-radius:10px; background:transparent; color:#cbd5e1; font-size:13px; font-weight:700; cursor:pointer; transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease; }
.account-support-btn:hover,.account-support-btn[aria-expanded="true"] { border-color:#818cf8; background:var(--account-accent-soft); color:#e0e7ff; }
.account-support-btn:focus-visible,.account-action:focus-visible,.account-text-btn:focus-visible,.account-code-row button:focus-visible,.account-bind-row button:focus-visible,.account-service-panel button:focus-visible,.account-primary-btn:focus-visible { outline:3px solid rgba(129,140,248,.28); outline-offset:2px; }
.account-qr-panel[hidden] { display:none !important; }
.account-qr-panel { position:absolute; z-index:20; top:calc(100% + 10px); right:0; display:grid; justify-items:center; width:184px; padding:14px; border:1px solid var(--account-border-strong); border-radius:14px; background:#151d2d; box-shadow:0 18px 44px rgba(0,0,0,.34); }
.account-qr-panel::before { content:""; position:absolute; top:-6px; right:24px; width:10px; height:10px; border-top:1px solid var(--account-border-strong); border-left:1px solid var(--account-border-strong); background:#151d2d; transform:rotate(45deg); }
.account-qr-panel img { display:block; width:154px; height:154px; padding:5px; border-radius:9px; background:#fff; object-fit:cover; }
.account-qr-panel strong { margin-top:10px; color:#e2e8f0; font-size:12px; }

.account-overview { display:grid; grid-template-columns:minmax(0,1fr) 205px; align-items:stretch; gap:18px; padding:22px; border:1px solid var(--account-border); border-radius:18px; background:var(--account-surface); box-shadow:0 12px 32px rgba(0,0,0,.16); }
.account-identity { display:flex; align-items:center; min-width:0; gap:16px; padding:3px 2px; }
.account-avatar { display:grid; flex:0 0 auto; place-items:center; width:58px; height:58px; border-radius:16px; background:var(--account-accent-strong); color:#fff; font-size:23px; font-weight:900; box-shadow:0 7px 18px rgba(79,70,229,.24); }
.account-identity-copy { min-width:0; }
.account-name-row { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.account-name-row h2 { max-width:380px; margin:0; overflow:hidden; color:var(--account-text); font-size:19px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.account-status { display:inline-flex; align-items:center; gap:5px; min-height:25px; padding:3px 9px; border:1px solid rgba(74,222,128,.22); border-radius:999px; background:var(--account-success-soft); color:var(--account-success); font-size:10px; font-weight:800; }
.account-identity-copy p { margin:9px 0 4px; color:#cbd5e1; font-size:12px; }
.account-identity-copy p i { width:15px; color:var(--account-subtle); text-align:center; }
.account-identity-copy small { color:var(--account-subtle); font-size:10px; }
.account-balance { display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 12px; padding:15px 16px; border:1px solid rgba(245,158,11,.22); border-radius:14px; background:var(--account-amber-soft); }
.account-balance > span { color:#d6b46d; font-size:11px; font-weight:700; }
.account-balance > strong { grid-column:2; grid-row:1 / span 2; color:var(--account-amber); font-size:29px; font-weight:900; letter-spacing:-.04em; line-height:1; }
.account-balance button { display:flex; align-items:center; gap:6px; width:max-content; padding:0; border:0; background:none; color:#fcd34d; font-size:11px; font-weight:800; cursor:pointer; }
.account-balance button:hover { color:#fff; }
.account-balance button i { font-size:9px; transition:transform 140ms ease; }
.account-balance button:hover i { transform:translateX(2px); }

.account-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
.account-action { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:76px; padding:14px; border:1px solid var(--account-border); border-radius:14px; background:var(--account-surface); color:var(--account-text); cursor:pointer; text-align:left; transition:background-color 140ms ease,border-color 140ms ease,box-shadow 140ms ease; }
.account-action:hover { border-color:rgba(129,140,248,.40); background:var(--account-surface-soft); box-shadow:0 8px 22px rgba(0,0,0,.13); }
.account-action-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:var(--account-accent-soft); color:#a5b4fc; font-size:14px; }
.account-action > span:nth-child(2) { min-width:0; }
.account-action strong,.account-action small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-action strong { color:inherit; font-size:13px; font-weight:800; }
.account-action small { margin-top:4px; color:var(--account-muted); font-size:10px; }
.account-action-arrow { color:var(--account-subtle); font-size:10px; transition:transform 140ms ease,color 140ms ease; }
.account-action:hover .account-action-arrow { color:#a5b4fc; transform:translateX(2px); }
.account-action-primary { border-color:var(--account-accent-strong); background:var(--account-accent-strong); color:#fff; box-shadow:0 8px 20px rgba(79,70,229,.20); }
.account-action-primary:hover { border-color:#6366f1; background:#5b52e9; box-shadow:0 10px 24px rgba(79,70,229,.27); }
.account-action-primary .account-action-icon { background:rgba(255,255,255,.16); color:#fff; }
.account-action-primary small { color:rgba(255,255,255,.70); }
.account-action-primary .account-action-arrow { color:rgba(255,255,255,.65); }

.account-content-grid { display:grid; grid-template-columns:minmax(0,1.42fr) minmax(300px,.78fr); align-items:start; gap:16px; }
.account-panel { border:1px solid var(--account-border); border-radius:17px; background:var(--account-surface); box-shadow:0 10px 28px rgba(0,0,0,.13); }
.account-pricing-panel { padding:20px; }
.account-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.account-panel-head.compact { margin-bottom:17px; }
.account-panel-head h2,.account-service-panel > h2 { margin:0; color:var(--account-text); font-size:15px; font-weight:800; }
.account-panel-head p { margin:5px 0 0; color:var(--account-muted); font-size:10px; line-height:1.55; }
.account-text-btn { flex:0 0 auto; padding:4px 0; border:0; background:none; color:#a5b4fc; font-size:11px; font-weight:800; cursor:pointer; }
.account-text-btn:hover { color:#fff; }
.account-text-btn i { margin-left:3px; font-size:8px; }
.account-price-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.account-price-grid > div { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:9px; min-height:57px; padding:10px; border:1px solid var(--account-border); border-radius:11px; background:rgba(255,255,255,.018); }
.account-price-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:9px; background:var(--account-accent-soft); color:#a5b4fc; font-size:12px; }
.account-price-grid strong,.account-price-grid small { display:block; }
.account-price-grid strong { color:#e5e7eb; font-size:11px; font-weight:800; }
.account-price-grid small { margin-top:3px; color:var(--account-subtle); font-size:9px; }
.account-price-grid b { color:var(--account-amber); font-size:15px; font-weight:900; }
.account-price-grid b::after { content:" 积分"; color:#b58b3a; font-size:8px; font-weight:700; }
.account-rewrite-price { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:10px; padding:11px 13px; border:1px solid rgba(129,140,248,.20); border-radius:11px; background:var(--account-accent-soft); color:#c7d2fe; font-size:10px; }
.account-rewrite-price > span:first-child { display:flex; align-items:center; gap:8px; }
.account-rewrite-price strong { color:#e0e7ff; font-size:11px; }
.account-rewrite-price b { color:var(--account-amber); font-size:15px; }
.account-side-stack { display:grid; gap:16px; min-width:0; }
.account-invite-panel { padding:20px; }
.account-reward-badge { display:grid; flex:0 0 auto; place-items:center; min-width:43px; height:29px; padding:0 9px; border:1px solid rgba(245,158,11,.22); border-radius:9px; background:var(--account-amber-soft); color:var(--account-amber); font-size:12px; font-weight:900; }
.account-invite-panel > label { display:block; margin-bottom:7px; color:var(--account-muted); font-size:10px; font-weight:700; }
.account-code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; border:1px solid var(--account-border-strong); border-radius:11px; overflow:hidden; background:rgba(255,255,255,.025); }
.account-code-row code { min-width:0; padding:11px 12px; overflow:hidden; color:#e0e7ff; font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; font-size:13px; font-weight:800; letter-spacing:.08em; text-overflow:ellipsis; white-space:nowrap; }
.account-code-row button { padding:0 12px; border:0; border-left:1px solid var(--account-border-strong); background:var(--account-accent-soft); color:#c7d2fe; font-size:10px; font-weight:800; cursor:pointer; }
.account-code-row button:hover { background:rgba(99,102,241,.22); color:#fff; }
.account-bind-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-top:10px; }
.account-bind-row .profile-input { min-width:0; height:39px; padding:0 11px; border:1px solid var(--account-border-strong) !important; border-radius:10px; background:rgba(255,255,255,.025) !important; color:var(--account-text) !important; outline:none; font-size:11px; }
.account-bind-row .profile-input::placeholder { color:var(--account-subtle) !important; }
.account-bind-row .profile-input:focus { border-color:#818cf8 !important; box-shadow:0 0 0 3px rgba(99,102,241,.13); }
.account-bind-row .profile-submit-btn { min-width:58px; height:39px; padding:0 13px; border:0; border-radius:10px; background:var(--account-accent-strong); color:#fff; font-size:11px; font-weight:800; cursor:pointer; }
.account-bind-row .profile-submit-btn:hover { background:#6366f1; }
.account-invite-complete { display:flex; align-items:center; gap:9px; margin-top:10px; padding:10px 11px; border:1px solid rgba(74,222,128,.20); border-radius:10px; background:var(--account-success-soft); color:var(--account-success); }
.account-invite-complete > i { font-size:14px; }
.account-invite-complete strong,.account-invite-complete small { display:block; }
.account-invite-complete strong { font-size:10px; }
.account-invite-complete small { margin-top:3px; color:#86b99a; font-size:9px; }
.account-service-panel { padding:18px 20px; }
.account-service-panel > h2 { margin-bottom:11px; }
.account-service-panel > button { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:39px; padding:8px 2px; border:0; border-top:1px solid var(--account-border); background:none; color:#cbd5e1; font-size:11px; cursor:pointer; text-align:left; }
.account-service-panel > h2 + button { border-top:0; }
.account-service-panel > button:hover { color:#fff; }
.account-service-panel > button span i { width:20px; color:#a5b4fc; text-align:center; }
.account-service-panel > button > i { color:var(--account-subtle); font-size:8px; }
.account-security-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:43px; padding:8px 2px; border-top:1px solid var(--account-border); color:var(--account-muted); font-size:9px; line-height:1.5; }
.account-security-row span i { width:20px; color:var(--account-success); text-align:center; }
.account-security-row > i { flex:0 0 auto; color:var(--account-subtle); font-size:10px; }
.account-service-panel > .account-logout-btn { color:#fda4af; }
.account-service-panel > .account-logout-btn span i { color:#fb7185; }
.account-service-panel > .account-logout-btn:hover { color:#fecdd3; }

.account-guest { display:grid; justify-items:center; width:min(410px,100%); margin:9vh auto 0; padding:42px 34px; border:1px solid var(--account-border); border-radius:20px; background:var(--account-surface); box-shadow:0 18px 48px rgba(0,0,0,.18); text-align:center; }
.account-guest-icon { display:grid; place-items:center; width:54px; height:54px; border-radius:16px; background:var(--account-accent-soft); color:#a5b4fc; font-size:19px; }
.account-guest h1 { margin:18px 0 8px; color:var(--account-text); font-size:23px; }
.account-guest p { margin:0; color:var(--account-muted); font-size:12px; }
.account-primary-btn { min-width:132px; min-height:42px; margin-top:23px; padding:9px 20px; border:0; border-radius:11px; background:var(--account-accent-strong); color:#fff; font-size:13px; font-weight:800; cursor:pointer; box-shadow:0 8px 20px rgba(79,70,229,.22); }
.account-primary-btn:hover { background:#6366f1; }

body.light-theme .account-page {
  --account-bg:#f7faff;
  --account-surface:#fff;
  --account-surface-soft:#fbfdff;
  --account-border:#dbe3ef;
  --account-border-strong:#cbd5e1;
  --account-text:#172033;
  --account-muted:#64748b;
  --account-subtle:#94a3b8;
  --account-accent:#4f46e5;
  --account-accent-strong:#4f46e5;
  --account-accent-soft:#eef2ff;
  --account-success:#15803d;
  --account-success-soft:#f0fdf4;
  --account-amber:#d97706;
  --account-amber-soft:#fffbeb;
  background:#f7faff !important;
}
body.light-theme .account-kicker { color:#4f46e5; }
body.light-theme .account-support-btn { border-color:#dbe3ef; background:#fff; color:#475569; box-shadow:0 2px 7px rgba(30,41,59,.04); }
body.light-theme .account-support-btn:hover,body.light-theme .account-support-btn[aria-expanded="true"] { border-color:#a5b4fc; background:#f8faff; color:#3730a3; }
body.light-theme .account-qr-panel { border-color:#dbe3ef; background:#fff; box-shadow:0 18px 42px rgba(30,41,59,.16); }
body.light-theme .account-qr-panel::before { border-color:#dbe3ef; background:#fff; }
body.light-theme .account-qr-panel strong { color:#334155; }
body.light-theme .account-overview,body.light-theme .account-panel,body.light-theme .account-action,body.light-theme .account-guest { box-shadow:0 8px 24px rgba(30,41,59,.055); }
body.light-theme .account-avatar { box-shadow:0 6px 16px rgba(79,70,229,.20); }
body.light-theme .account-status { border-color:#bbf7d0; }
body.light-theme .account-identity-copy p { color:#475569; }
body.light-theme .account-balance { border-color:#fde68a; }
body.light-theme .account-balance > span { color:#92400e; }
body.light-theme .account-balance button { color:#b45309; }
body.light-theme .account-balance button:hover { color:#78350f; }
body.light-theme .account-action:hover { border-color:#a5b4fc; background:#fbfdff; box-shadow:0 9px 22px rgba(30,41,59,.075); }
body.light-theme .account-action-icon { color:#4f46e5; }
body.light-theme .account-action-primary { border-color:#4f46e5; background:#4f46e5; color:#fff; box-shadow:0 8px 18px rgba(79,70,229,.18); }
body.light-theme .account-action-primary:hover { border-color:#4338ca; background:#4338ca; box-shadow:0 10px 22px rgba(79,70,229,.23); }
body.light-theme .account-action-primary .account-action-icon { color:#fff; }
body.light-theme .account-price-grid > div { background:#fbfdff; }
body.light-theme .account-price-grid strong { color:#334155; }
body.light-theme .account-price-grid b::after { color:#b45309; }
body.light-theme .account-rewrite-price { border-color:#c7d2fe; color:#4338ca; }
body.light-theme .account-rewrite-price strong { color:#312e81; }
body.light-theme .account-text-btn { color:#4f46e5; }
body.light-theme .account-text-btn:hover { color:#312e81; }
body.light-theme .account-reward-badge { border-color:#fde68a; }
body.light-theme .account-code-row { background:#fff; }
body.light-theme .account-code-row code { color:#3730a3; }
body.light-theme .account-code-row button { border-left-color:#c7d2fe; background:#eef2ff; color:#4338ca; }
body.light-theme .account-code-row button:hover { background:#e0e7ff; color:#312e81; }
body.light-theme .account-bind-row .profile-input { border-color:#cbd5e1 !important; background:#fff !important; color:#172033 !important; }
body.light-theme .account-bind-row .profile-input::placeholder { color:#94a3b8 !important; }
body.light-theme .account-invite-complete { border-color:#bbf7d0; }
body.light-theme .account-invite-complete small { color:#4b8a62; }
body.light-theme .account-service-panel > button { color:#475569; }
body.light-theme .account-service-panel > button:hover { color:#172033; }
body.light-theme .account-service-panel > .account-logout-btn { color:#be123c; }
body.light-theme .account-service-panel > .account-logout-btn:hover { color:#9f1239; }

@media (max-width:800px) {
  .account-page { padding:34px 20px 50px; }
  .account-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .account-content-grid { grid-template-columns:1fr; }
  .account-side-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .account-page { padding:26px 16px 40px; }
  .account-header { align-items:flex-start; margin-bottom:18px; }
  .account-header h1 { font-size:26px; }
  .account-support-btn span { display:none; }
  .account-support-btn { width:40px; padding:0; }
  .account-qr-panel { right:-2px; }
  .account-overview { grid-template-columns:1fr; gap:14px; padding:18px; }
  .account-identity { align-items:flex-start; }
  .account-name-row { align-items:flex-start; flex-direction:column; gap:6px; }
  .account-name-row h2 { max-width:100%; }
  .account-balance { grid-template-columns:1fr auto; }
  .account-actions { grid-template-columns:1fr; gap:9px; }
  .account-action { min-height:68px; }
  .account-price-grid { grid-template-columns:1fr; }
  .account-side-stack { grid-template-columns:1fr; }
  .account-panel-head { gap:10px; }
  .account-rewrite-price { align-items:flex-start; flex-direction:column; gap:7px; }
  .account-guest { margin-top:5vh; padding:34px 22px; }
}
@media (prefers-reduced-motion:reduce) {
  .account-page * { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; }
}

/* 顶部账户入口：头像承载低频账户操作 */
.user-info { gap:10px; }
.account-menu-wrap { position:relative; flex:0 0 auto; }
.account-avatar-btn { display:grid; place-items:center; width:38px; height:38px; padding:0; border:1px solid rgba(129,140,248,.28); border-radius:50%; background:#4f46e5; color:#fff; cursor:pointer; box-shadow:0 4px 12px rgba(49,46,129,.24); transition:border-color 140ms ease,background-color 140ms ease,box-shadow 140ms ease,transform 140ms ease; }
.account-avatar-btn:hover,.account-avatar-btn[aria-expanded="true"] { border-color:#a5b4fc; background:#6366f1; box-shadow:0 6px 16px rgba(49,46,129,.32); }
.account-avatar-btn:active { transform:scale(.96); }
.account-avatar-btn:focus-visible,.account-menu-code button:focus-visible,.account-menu-logout:focus-visible { outline:3px solid rgba(129,140,248,.30); outline-offset:2px; }
.account-avatar-letter { font-size:14px; font-weight:900; line-height:1; }
.account-menu[hidden] { display:none !important; }
.account-menu { position:absolute; z-index:1100; top:calc(100% + 11px); right:0; width:238px; padding:14px; border:1px solid rgba(255,255,255,.10); border-radius:15px; background:#111827; color:#f8fafc; box-shadow:0 20px 48px rgba(0,0,0,.34); }
.account-menu::before { content:""; position:absolute; top:-6px; right:14px; width:10px; height:10px; border-top:1px solid rgba(255,255,255,.10); border-left:1px solid rgba(255,255,255,.10); background:#111827; transform:rotate(45deg); }
.account-menu-user { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:1px 2px 11px; }
.account-menu-user strong { max-width:135px; overflow:hidden; color:#f8fafc; font-size:13px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.account-menu-user span { color:#94a3b8; font-size:9px; white-space:nowrap; }
.account-menu-code { display:grid; grid-template-columns:minmax(0,1fr) 36px; overflow:hidden; border:1px solid rgba(129,140,248,.24); border-radius:10px; background:rgba(99,102,241,.09); }
.account-menu-code code { min-width:0; padding:10px 11px; overflow:hidden; color:#e0e7ff; font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; font-size:12px; font-weight:800; letter-spacing:.06em; text-overflow:ellipsis; white-space:nowrap; }
.account-menu-code button { border:0; border-left:1px solid rgba(129,140,248,.24); background:rgba(99,102,241,.10); color:#a5b4fc; cursor:pointer; }
.account-menu-code button:hover { background:rgba(99,102,241,.22); color:#fff; }
.account-menu-logout { display:flex; align-items:center; gap:9px; width:100%; margin-top:10px; padding:10px 5px 2px; border:0; border-top:1px solid rgba(255,255,255,.08); background:transparent; color:#fda4af; font-size:11px; font-weight:700; cursor:pointer; text-align:left; }
.account-menu-logout:hover { color:#fecdd3; }
.account-menu-logout i { width:16px; text-align:center; }
body.light-theme .account-avatar-btn { border-color:#c7d2fe; background:#4f46e5; box-shadow:0 4px 12px rgba(79,70,229,.20); }
body.light-theme .account-avatar-btn:hover,body.light-theme .account-avatar-btn[aria-expanded="true"] { border-color:#818cf8; background:#4338ca; }
body.light-theme .account-menu { border-color:#dbe3ef; background:#fff; color:#172033; box-shadow:0 18px 42px rgba(30,41,59,.16); }
body.light-theme .account-menu::before { border-color:#dbe3ef; background:#fff; }
body.light-theme .account-menu-user strong { color:#172033; }
body.light-theme .account-menu-user span { color:#64748b; }
body.light-theme .account-menu-code { border-color:#c7d2fe; background:#f8faff; }
body.light-theme .account-menu-code code { color:#3730a3; }
body.light-theme .account-menu-code button { border-left-color:#c7d2fe; background:#eef2ff; color:#4f46e5; }
body.light-theme .account-menu-code button:hover { background:#e0e7ff; color:#312e81; }
body.light-theme .account-menu-logout { border-top-color:#e2e8f0; color:#be123c; }
body.light-theme .account-menu-logout:hover { color:#9f1239; }
@media (max-width:768px) {
  .nav-actions { margin-left:auto; gap:8px; }
  .user-info { gap:7px; }
  .credits-badge { padding:6px 9px; font-size:12px; }
  .account-avatar-btn { width:36px; height:36px; }
  .account-menu { position:fixed; top:70px; right:12px; width:min(238px,calc(100vw - 24px)); }
  .account-menu::before { right:17px; }
}
@media (max-width:420px) {
  .navbar .container { padding:0 12px; }
  .nav-brand { gap:4px; font-size:19px; }
  .nav-brand img { width:28px !important; height:28px !important; margin-right:3px !important; }
  .theme-toggle { width:34px; height:34px; }
  .credits-badge { padding:5px 8px; }
  .nav-toggle { margin-left:0; font-size:21px; }
}

/* 未登录公共首页：品牌落地页 */
.nav-brand { border:0; background:transparent; font-family:inherit; }
.nav-brand:focus-visible { outline:3px solid rgba(129,140,248,.28); outline-offset:3px; border-radius:10px; }
.public-home {
  --landing-bg:#080b14;
  --landing-surface:#111827;
  --landing-surface-soft:#151d2d;
  --landing-border:rgba(255,255,255,.09);
  --landing-text:#f8fafc;
  --landing-muted:#94a3b8;
  --landing-subtle:#64748b;
  --landing-accent:#6366f1;
  --landing-accent-strong:#4f46e5;
  min-height:calc(100vh - 64px);
  background:var(--landing-bg);
  color:var(--landing-text);
  font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif;
}
.public-home * { box-sizing:border-box; }
.public-home button { font-family:inherit; }
.landing-shell { width:min(1080px,calc(100% - 48px)); margin:0 auto; padding:68px 0 72px; }
.landing-hero { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(330px,.72fr); align-items:center; gap:70px; min-height:500px; }
.landing-kicker { display:block; margin-bottom:19px; color:#818cf8; font-size:12px; font-weight:800; letter-spacing:.10em; }
.landing-hero h1 { max-width:690px; margin:0; color:var(--landing-text); font-size:clamp(42px,5.5vw,64px); font-weight:900; letter-spacing:-.055em; line-height:1.13; }
.landing-hero-copy > p { max-width:560px; margin:22px 0 0; color:var(--landing-muted); font-size:16px; line-height:1.85; }
.landing-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:30px; }
.landing-primary,.landing-secondary { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:46px; padding:11px 19px; border-radius:11px; font-size:13px; font-weight:800; cursor:pointer; transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease; }
.landing-primary { border:1px solid var(--landing-accent-strong); background:var(--landing-accent-strong); color:#fff; box-shadow:0 9px 22px rgba(79,70,229,.22); }
.landing-primary:hover { border-color:#6366f1; background:#6366f1; box-shadow:0 11px 26px rgba(79,70,229,.30); }
.landing-primary i { font-size:10px; }
.landing-secondary { border:1px solid rgba(148,163,184,.25); background:transparent; color:#cbd5e1; }
.landing-secondary:hover { border-color:#818cf8; background:rgba(99,102,241,.10); color:#fff; }
.landing-primary:focus-visible,.landing-secondary:focus-visible,.landing-document-card > button:focus-visible { outline:3px solid rgba(129,140,248,.28); outline-offset:2px; }
.landing-trust { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-top:24px; color:var(--landing-subtle); font-size:10px; }
.landing-trust span { display:inline-flex; align-items:center; gap:6px; }
.landing-trust i { display:grid; place-items:center; width:16px; height:16px; border-radius:50%; background:rgba(34,197,94,.11); color:#4ade80; font-size:7px; }
.landing-document-card { padding:22px; border:1px solid var(--landing-border); border-radius:18px; background:var(--landing-surface); box-shadow:0 18px 48px rgba(0,0,0,.20); }
.landing-document-head { display:flex; align-items:center; gap:12px; padding-bottom:17px; border-bottom:1px solid var(--landing-border); }
.landing-document-head > span { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:rgba(99,102,241,.14); color:#a5b4fc; font-size:15px; }
.landing-document-head strong,.landing-document-head small { display:block; }
.landing-document-head strong { color:var(--landing-text); font-size:14px; }
.landing-document-head small { margin-top:4px; color:var(--landing-muted); font-size:9px; }
.landing-document-list { display:grid; gap:0; padding:8px 0; }
.landing-document-list > div { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:43px; border-bottom:1px solid var(--landing-border); color:#cbd5e1; font-size:11px; }
.landing-document-list > div:last-child { border-bottom:0; }
.landing-document-list b { color:#fbbf24; font-size:10px; white-space:nowrap; }
.landing-document-card > button { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:41px; padding:9px 12px; border:1px solid rgba(129,140,248,.22); border-radius:10px; background:rgba(99,102,241,.10); color:#c7d2fe; font-size:11px; font-weight:800; cursor:pointer; }
.landing-document-card > button:hover { border-color:#818cf8; background:rgba(99,102,241,.18); color:#fff; }
.landing-document-card > button i { font-size:8px; }
.landing-capabilities { padding:66px 0; border-top:1px solid var(--landing-border); }
.landing-section-head { max-width:650px; margin-bottom:28px; }
.landing-section-head > span { color:#818cf8; font-size:10px; font-weight:800; letter-spacing:.12em; }
.landing-section-head h2 { margin:8px 0 0; color:var(--landing-text); font-size:29px; letter-spacing:-.035em; }
.landing-capability-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.landing-capability-grid article { min-height:190px; padding:22px; border:1px solid var(--landing-border); border-radius:16px; background:var(--landing-surface); }
.landing-capability-icon { display:grid; place-items:center; width:39px; height:39px; border-radius:11px; background:rgba(99,102,241,.13); color:#a5b4fc; font-size:14px; }
.landing-capability-grid h3 { margin:20px 0 8px; color:var(--landing-text); font-size:16px; }
.landing-capability-grid p { margin:0; color:var(--landing-muted); font-size:11px; line-height:1.8; }
.landing-final-cta { display:flex; align-items:center; justify-content:space-between; gap:30px; padding:28px 30px; border:1px solid var(--landing-border); border-radius:18px; background:var(--landing-surface-soft); }
.landing-final-cta h2 { margin:0; color:var(--landing-text); font-size:23px; }
.landing-final-cta p { margin:7px 0 0; color:var(--landing-muted); font-size:11px; }
body.light-theme .public-home {
  --landing-bg:#f7faff;
  --landing-surface:#fff;
  --landing-surface-soft:#fff;
  --landing-border:#dbe3ef;
  --landing-text:#172033;
  --landing-muted:#64748b;
  --landing-subtle:#64748b;
  --landing-accent:#4f46e5;
  --landing-accent-strong:#4f46e5;
  background:#f7faff;
}
body.light-theme .landing-kicker,body.light-theme .landing-section-head > span { color:#4f46e5; }
body.light-theme .landing-secondary { border-color:#cbd5e1; background:#fff; color:#475569; }
body.light-theme .landing-secondary:hover { border-color:#a5b4fc; background:#f8faff; color:#3730a3; }
body.light-theme .landing-trust i { background:#f0fdf4; color:#15803d; }
body.light-theme .landing-document-card,body.light-theme .landing-capability-grid article,body.light-theme .landing-final-cta { box-shadow:0 9px 26px rgba(30,41,59,.055); }
body.light-theme .landing-document-head > span,body.light-theme .landing-capability-icon { background:#eef2ff; color:#4f46e5; }
body.light-theme .landing-document-list > div { color:#475569; }
body.light-theme .landing-document-list b { color:#d97706; }
body.light-theme .landing-document-card > button { border-color:#c7d2fe; background:#eef2ff; color:#4338ca; }
body.light-theme .landing-document-card > button:hover { border-color:#a5b4fc; background:#e0e7ff; color:#312e81; }
@media (max-width:820px) {
  .landing-shell { width:min(100% - 36px,680px); padding-top:50px; }
  .landing-hero { grid-template-columns:1fr; gap:34px; min-height:auto; }
  .landing-document-card { width:100%; }
  .landing-capability-grid { grid-template-columns:1fr; }
  .landing-capability-grid article { min-height:0; }
}
@media (max-width:560px) {
  .landing-shell { width:calc(100% - 32px); padding:38px 0 48px; }
  .landing-hero h1 { font-size:39px; }
  .landing-hero-copy > p { font-size:14px; }
  .landing-actions { align-items:stretch; flex-direction:column; }
  .landing-primary,.landing-secondary { width:100%; }
  .landing-trust { align-items:flex-start; flex-direction:column; gap:9px; }
  .landing-document-card { padding:18px; }
  .landing-capabilities { padding:52px 0; }
  .landing-section-head h2 { font-size:24px; }
  .landing-final-cta { align-items:stretch; flex-direction:column; padding:23px; }
}

/* 2026 public entry refresh: quiet editorial landing + split authentication. */
body.public-home-view {
  background:#f7f5f1;
  color:#1c1b1a;
}
body.public-home-view .navbar {
  background:rgba(250,249,246,.90);
  border-bottom-color:rgba(49,46,43,.09);
  box-shadow:0 1px 0 rgba(49,46,43,.04);
}
body.public-home-view .nav-brand { color:#25211f; }
body.public-home-view .nav-link { color:#77716b; }
body.public-home-view .nav-link:hover { color:#292522; background:#f0ece6; }
body.public-home-view .nav-link.active { color:#1f1b18; background:#eae5de; box-shadow:none; }
body.public-home-view .theme-toggle {
  color:#6f6963;
  background:#f1ede7;
  border-color:#e5dfd6;
  box-shadow:none;
}
body.public-home-view .theme-toggle:hover { color:#25211f; border-color:#d8d0c5; box-shadow:none; }
body.public-home-view #loginBtn {
  min-height:38px;
  padding:9px 18px;
  border:1px solid #24211f;
  border-radius:10px;
  color:#fff;
  background:#24211f;
  box-shadow:0 6px 16px rgba(36,33,31,.13);
}
body.public-home-view #loginBtn:hover { background:#393431; transform:translateY(-1px); }
body.public-home-view .main-content { background:#f7f5f1; }

.public-home {
  --landing-bg:#f7f5f1;
  --landing-surface:#fff;
  --landing-surface-soft:#efebe5;
  --landing-border:#dfd9d1;
  --landing-text:#211e1c;
  --landing-muted:#736d67;
  --landing-subtle:#8d867e;
  --landing-accent:#5b52cf;
  --landing-accent-strong:#4e46bf;
  position:relative;
  min-height:calc(100vh - 64px);
  overflow:hidden;
  background:
    linear-gradient(rgba(70,64,58,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(70,64,58,.035) 1px,transparent 1px),
    var(--landing-bg);
  background-size:72px 72px;
  color:var(--landing-text);
}
.landing-atmosphere { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.landing-atmosphere span { position:absolute; display:block; border-radius:50%; filter:blur(1px); }
.landing-atmosphere span:first-child { top:-250px; right:-150px; width:560px; height:560px; background:rgba(91,82,207,.075); }
.landing-atmosphere span:last-child { top:430px; left:-220px; width:430px; height:430px; background:rgba(198,151,88,.085); }
.landing-shell { position:relative; z-index:1; width:min(1160px,calc(100% - 56px)); padding:78px 0 72px; }
.landing-hero { grid-template-columns:minmax(0,1.02fr) minmax(390px,.78fr); gap:88px; min-height:560px; }
.landing-kicker { display:inline-flex; align-items:center; gap:8px; margin-bottom:23px; color:#5b52cf; font-size:11px; letter-spacing:.12em; }
.landing-kicker i { font-size:10px; }
.landing-hero h1 { max-width:710px; color:#201d1b; font-size:clamp(48px,6vw,76px); font-weight:850; letter-spacing:-.065em; line-height:1.09; }
.landing-hero h1 em { color:#5b52cf; font-family:Georgia,"Times New Roman",serif; font-weight:700; font-style:italic; letter-spacing:-.045em; }
.landing-hero-copy > p { max-width:600px; margin-top:26px; color:#716b65; font-size:17px; line-height:1.9; }
.landing-actions { gap:12px; margin-top:34px; }
.landing-primary,.landing-secondary { min-height:50px; padding:12px 22px; border-radius:12px; font-size:13px; letter-spacing:.01em; }
.landing-primary { border-color:#24211f; background:#24211f; box-shadow:0 10px 24px rgba(36,33,31,.14); }
.landing-primary:hover { border-color:#393431; background:#393431; box-shadow:0 12px 28px rgba(36,33,31,.19); }
.landing-secondary { border-color:#d7d0c7; background:rgba(255,255,255,.5); color:#57514c; }
.landing-secondary:hover { border-color:#aaa198; background:#fff; color:#211e1c; }
.landing-trust { gap:19px; margin-top:27px; color:#807972; font-size:11px; }
.landing-trust i { width:17px; height:17px; background:#e9e5f8; color:#5b52cf; }

.landing-workspace-card { position:relative; padding:20px; border:1px solid #ddd6cd; border-radius:24px; background:rgba(255,255,255,.78); box-shadow:0 28px 80px rgba(48,43,38,.11); backdrop-filter:blur(18px); }
.landing-workspace-card::before { content:""; position:absolute; z-index:-1; inset:28px -20px -22px 35px; border-radius:24px; background:#e7e1da; opacity:.65; }
.landing-workspace-top { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:3px 3px 18px; border-bottom:1px solid #e5dfd8; }
.landing-workspace-top > div { display:flex; align-items:center; gap:9px; }
.landing-workspace-top strong { color:#292522; font-size:13px; }
.landing-workspace-top > span { color:#948c84; font-size:9px; font-weight:800; letter-spacing:.14em; }
.landing-status-dot { width:8px; height:8px; border-radius:50%; background:#5b52cf; box-shadow:0 0 0 5px rgba(91,82,207,.10); }
.landing-topic-card { display:grid; gap:7px; margin:17px 0 10px; padding:17px; border:1px solid #e4ded6; border-radius:15px; background:#f7f4f0; }
.landing-topic-card > span { color:#938b83; font-size:9px; font-weight:800; letter-spacing:.10em; }
.landing-topic-card strong { color:#302b28; font-size:13px; line-height:1.6; }
.landing-topic-card small { color:#6f9a7c; font-size:9px; }
.landing-topic-card small i { margin-right:5px; }
.landing-workflow-list { display:grid; }
.landing-workflow-list > div { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:62px; padding:9px 6px; border-bottom:1px solid #ebe6e0; }
.landing-workflow-list > div:last-child { border-bottom:0; }
.landing-workflow-list b { display:grid; place-items:center; width:30px; height:30px; border:1px solid #ded8d0; border-radius:9px; color:#948c84; font-size:9px; }
.landing-workflow-list span strong,.landing-workflow-list span small { display:block; }
.landing-workflow-list span strong { color:#393431; font-size:11px; }
.landing-workflow-list span small { margin-top:3px; color:#9b948c; font-size:9px; }
.landing-workflow-list .is-done > i { color:#6f9a7c; font-size:10px; }
.landing-workflow-list .is-current b { border-color:#c8c2f0; color:#5149c2; background:#efedfb; }
.landing-workflow-list em { padding:4px 7px; border-radius:999px; color:#5149c2; background:#efedfb; font-size:8px; font-style:normal; font-weight:800; }
.landing-workspace-card > button { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:46px; margin-top:13px; padding:10px 14px; border:1px solid #d7d0c7; border-radius:12px; background:#fff; color:#302b28; font-size:11px; font-weight:800; cursor:pointer; }
.landing-workspace-card > button:hover { border-color:#bcb3aa; background:#faf8f5; }
.landing-workspace-card > button span { display:flex; align-items:center; gap:8px; }
.landing-workspace-card > button span i { color:#5b52cf; }
.landing-workspace-card > button > i { font-size:9px; }

.landing-capabilities { padding:84px 0 74px; border-top:1px solid #ded8d0; }
.landing-section-head { max-width:700px; margin-bottom:36px; }
.landing-section-head > span { color:#5b52cf; font-size:10px; letter-spacing:.15em; }
.landing-section-head h2 { margin-top:10px; color:#211e1c; font-size:34px; letter-spacing:-.045em; }
.landing-section-head p { margin-top:10px; color:#847d76; font-size:13px; }
.landing-capability-grid { gap:16px; }
.landing-capability-grid article { position:relative; min-height:250px; padding:26px; border-color:#ded8d0; border-radius:19px; background:rgba(255,255,255,.70); box-shadow:none; }
.landing-capability-grid article:hover { transform:translateY(-3px); border-color:#cbc3ba; background:#fff; box-shadow:0 18px 45px rgba(48,43,38,.08); }
.landing-capability-number { position:absolute; top:24px; right:24px; color:#c1bab2; font-family:Georgia,"Times New Roman",serif; font-size:12px; font-style:italic; }
.landing-capability-icon { width:43px; height:43px; border-radius:13px; background:#efedfb; color:#5b52cf; }
.landing-capability-grid h3 { margin:27px 0 10px; color:#292522; font-size:17px; }
.landing-capability-grid p { max-width:310px; color:#79726c; font-size:12px; line-height:1.85; }
.landing-capability-meta { position:absolute; left:26px; bottom:24px; color:#9b948c; font-size:9px; letter-spacing:.04em; }
.landing-final-cta { padding:37px 40px; border-color:#d8d1c8; border-radius:22px; background:#eae5de; box-shadow:none; }
.landing-final-cta > div > span { color:#6a61ce; font-size:9px; font-weight:800; letter-spacing:.15em; }
.landing-final-cta h2 { margin-top:8px; color:#211e1c; font-size:25px; }
.landing-final-cta p { color:#77716b; font-size:11px; }

body.light-theme .public-home { background-color:#f7f5f1; }
body.light-theme .landing-kicker,body.light-theme .landing-section-head > span { color:#5b52cf; }
body.light-theme .landing-workspace-card,body.light-theme .landing-capability-grid article,body.light-theme .landing-final-cta { box-shadow:none; }
body.light-theme .landing-capability-grid article:hover { box-shadow:0 18px 45px rgba(48,43,38,.08); }

/* Authentication shell intentionally stays light in both application themes. */
body.auth-modal-open { overflow:hidden; }
.auth-modal { padding:22px; background:rgba(19,17,16,.56); backdrop-filter:blur(10px); }
.auth-modal.active { animation:authBackdropIn 180ms ease-out; }
.auth-modal .auth-shell { display:grid; grid-template-columns:minmax(320px,.78fr) minmax(440px,1.22fr); width:min(100%,960px); max-width:960px; max-height:min(760px,calc(100vh - 44px)); padding:0; overflow:hidden; border:1px solid rgba(255,255,255,.58); border-radius:26px; background:#fff; box-shadow:0 32px 100px rgba(16,14,13,.26); animation:authShellIn 240ms cubic-bezier(.16,1,.3,1); }
@keyframes authBackdropIn { from { opacity:0; } to { opacity:1; } }
@keyframes authShellIn { from { opacity:0; transform:translateY(14px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
.auth-modal .modal-close { z-index:3; display:grid; place-items:center; top:17px; right:17px; width:36px; height:36px; border:1px solid #e6e0d8; border-radius:12px; background:#f4f1ed; color:#817a73; font-size:14px; }
.auth-modal .modal-close:hover { color:#25211f; background:#ebe6e0; transform:rotate(4deg); }
.auth-brand-panel { position:relative; display:flex; flex-direction:column; min-height:660px; padding:35px 34px 30px; overflow:hidden; background:#f0ece6; color:#2a2623; }
.auth-brand-panel::before { content:""; position:absolute; top:-150px; right:-150px; width:370px; height:370px; border-radius:50%; background:rgba(91,82,207,.09); }
.auth-brand-panel::after { content:""; position:absolute; left:-120px; bottom:-170px; width:330px; height:330px; border-radius:50%; background:rgba(204,163,111,.11); }
.auth-brand-lockup { position:relative; z-index:1; display:flex; align-items:center; gap:12px; }
.auth-brand-lockup img { width:42px; height:42px; border-radius:13px; box-shadow:0 5px 14px rgba(48,43,38,.10); }
.auth-brand-lockup strong,.auth-brand-lockup span { display:block; }
.auth-brand-lockup strong { color:#26221f; font-size:18px; letter-spacing:-.02em; }
.auth-brand-lockup span { margin-top:1px; color:#918981; font-size:9px; letter-spacing:.09em; }
.auth-brand-copy { position:relative; z-index:1; margin-top:86px; }
.auth-brand-kicker { display:block; margin-bottom:14px; color:#5b52cf; font-size:9px; font-weight:850; letter-spacing:.16em; }
.auth-brand-copy h2 { margin:0; color:#24201d; font-size:30px; font-weight:850; letter-spacing:-.05em; line-height:1.3; }
.auth-brand-copy p { margin:18px 0 0; color:#7c756e; font-size:12px; line-height:1.9; }
.auth-brand-features { position:relative; z-index:1; display:grid; gap:10px; margin-top:32px; }
.auth-brand-features > div { display:flex; align-items:center; gap:11px; color:#5f5954; font-size:11px; }
.auth-brand-features i { display:grid; place-items:center; width:31px; height:31px; border:1px solid #e0dad2; border-radius:10px; background:rgba(255,255,255,.72); color:#5b52cf; font-size:11px; }
.auth-brand-foot { position:relative; z-index:1; margin-top:auto; padding:12px 14px; border:1px solid rgba(91,82,207,.10); border-radius:12px; background:rgba(91,82,207,.065); color:#625ab6; font-size:9px; font-weight:750; }
.auth-brand-foot i { margin-right:6px; }
.auth-container { min-width:0; padding:32px 44px 36px; overflow-y:auto; background:#fff; color:#211e1c; }
.auth-container .auth-tabs { width:calc(100% - 48px); margin:2px 48px 34px 0; padding:4px; gap:4px; border:0; border-radius:12px; background:#f1ede8; }
.auth-container .auth-tab { min-height:37px; padding:8px 12px; border-radius:9px; color:#8a837c; font-size:12px; font-weight:750; }
.auth-container .auth-tab.active { color:#292522; background:#fff; box-shadow:0 2px 8px rgba(48,43,38,.09); }
.auth-container .auth-tab.active::after { display:none; }
.auth-form-head { margin-bottom:24px; }
.auth-form-kicker { display:block; margin-bottom:8px; color:#5b52cf; font-size:9px; font-weight:850; letter-spacing:.16em; }
.auth-container .auth-form h2 { margin:0; color:#24201d; text-align:left; font-size:25px; font-weight:850; letter-spacing:-.04em; }
.auth-form-head p { margin:7px 0 0; color:#968e87; font-size:11px; }
.auth-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:22px; padding:4px; border-radius:12px; background:#f4f1ed; }
.auth-mode-tab { min-height:38px; border:0; border-radius:9px; background:transparent; color:#8b847d; font-size:11px; font-weight:750; cursor:pointer; }
.auth-mode-tab.is-active { color:#292522; background:#fff; box-shadow:0 2px 8px rgba(48,43,38,.09); }
.auth-container .form-group { margin-bottom:16px; }
.auth-container .form-group > label { margin-bottom:7px; color:#4c4641; font-size:11px; font-weight:750; }
.auth-input-wrap { display:flex; align-items:center; width:100%; min-height:48px; padding:0 14px; border:1px solid #ded8d0; border-radius:12px; background:#fff; transition:border-color 140ms ease,box-shadow 140ms ease,background-color 140ms ease; }
.auth-input-wrap:focus-within { border-color:#8c84dc; box-shadow:0 0 0 3px rgba(91,82,207,.11); }
.auth-input-wrap > i { width:22px; color:#aaa29a; font-size:11px; }
.auth-input-wrap > span { padding-right:12px; border-right:1px solid #e5dfd7; color:#7d766f; font-size:11px; }
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input { min-width:0; height:46px; padding:0 0 0 11px; border:0 !important; outline:0; background:transparent !important; color:#292522 !important; box-shadow:none !important; font-size:12px; }
.auth-container .auth-input-wrap input::placeholder { color:#aaa39b !important; }
.auth-code-group { align-items:stretch; gap:9px; }
.auth-code-group .auth-input-wrap { flex:1; min-width:0; }
.auth-code-group .btn { flex:0 0 116px; border:1px solid #ded8d0; border-radius:12px; background:#f1ede8; color:#4d4742; font-size:10px; font-weight:800; }
.auth-code-group .btn:hover { border-color:#c9c1b8; background:#e9e4de; }
.auth-code-group .btn:disabled { color:#aaa29a; }
.auth-legal { margin:2px 0 16px; color:#9a928b; font-size:9px; line-height:1.6; }
.auth-legal a,.auth-agree-label a { color:#5b52cf; font-weight:750; }
.auth-container .auth-submit { min-height:49px; border:1px solid #24211f; border-radius:12px; background:#24211f; color:#fff; font-size:12px; font-weight:850; box-shadow:0 9px 20px rgba(36,33,31,.15); }
.auth-container .auth-submit:hover { background:#393431; transform:translateY(-1px); box-shadow:0 11px 24px rgba(36,33,31,.20); }
.auth-register-passwords { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.auth-agree-label { color:#847d76; font-size:9px; }
.auth-agree-label input[type="checkbox"] { width:15px; height:15px; accent-color:#5b52cf; }

@media (max-width:900px) {
  .landing-shell { width:min(100% - 40px,720px); padding-top:58px; }
  .landing-hero { grid-template-columns:1fr; gap:45px; min-height:auto; }
  .landing-workspace-card { width:100%; max-width:560px; }
  .landing-capability-grid { grid-template-columns:1fr; }
  .landing-capability-grid article { min-height:220px; }
  .auth-modal .auth-shell { grid-template-columns:minmax(240px,.65fr) minmax(410px,1fr); }
  .auth-brand-panel { padding:31px 27px 27px; }
  .auth-brand-copy h2 { font-size:25px; }
  .auth-container { padding:30px 34px 34px; }
}
@media (max-width:720px) {
  body.public-home-view .nav-menu { background:rgba(250,249,246,.98) !important; border-top-color:#e5dfd6; }
  body.public-home-view .nav-link { color:#6f6963 !important; background:#f4f1ed; border-color:#e7e1d9; }
  body.public-home-view .nav-link.active { color:#211e1c !important; border-color:#d8d1c8; }
  body.public-home-view .nav-toggle { color:#302b28 !important; }
  .auth-modal { align-items:flex-start; padding:12px; overflow-y:auto; }
  .auth-modal .auth-shell { grid-template-columns:1fr; width:min(100%,520px); max-height:none; margin:auto; border-radius:21px; }
  .auth-brand-panel { min-height:0; padding:25px 25px 23px; }
  .auth-brand-panel::before { top:-190px; right:-160px; }
  .auth-brand-copy { margin-top:40px; }
  .auth-brand-copy h2 { font-size:25px; }
  .auth-brand-copy p { max-width:420px; }
  .auth-brand-features { grid-template-columns:1fr 1fr; }
  .auth-brand-features > div:last-child { display:none; }
  .auth-brand-foot { display:none; }
  .auth-container { max-height:none; padding:28px 25px 30px; }
  .auth-container .auth-tabs { width:calc(100% - 42px); margin-right:42px; }
}
@media (max-width:560px) {
  .landing-shell { width:calc(100% - 32px); padding:44px 0 50px; }
  .landing-hero h1 { font-size:44px; }
  .landing-hero-copy > p { font-size:14px; }
  .landing-actions { flex-direction:column; align-items:stretch; }
  .landing-primary,.landing-secondary { width:100%; }
  .landing-trust { align-items:flex-start; flex-direction:column; gap:10px; }
  .landing-workspace-card { padding:16px; border-radius:19px; }
  .landing-workspace-card::before { display:none; }
  .landing-capabilities { padding:62px 0; }
  .landing-section-head h2 { font-size:28px; }
  .landing-capability-grid article { min-height:225px; padding:23px; }
  .landing-capability-meta { left:23px; }
  .landing-final-cta { align-items:stretch; flex-direction:column; padding:27px; }
  .auth-modal .auth-shell { border-radius:18px; }
  .auth-brand-panel { padding:22px 20px; }
  .auth-brand-copy { margin-top:31px; }
  .auth-brand-copy h2 { font-size:22px; }
  .auth-brand-copy p { font-size:10px; }
  .auth-brand-features { display:none; }
  .auth-container { padding:25px 20px 27px; }
  .auth-container .auth-form h2 { font-size:22px; }
  .auth-code-group { display:grid; grid-template-columns:minmax(0,1fr) 108px; }
  .auth-code-group .btn { min-width:0; }
  .auth-register-passwords { grid-template-columns:1fr; gap:0; }
}

/* Original auth composition: a single vertical writing-desk panel with an
   abstract progress scene, deliberately avoiding the common split-screen form. */
.auth-modal { padding:20px; background:rgba(25,22,31,.62); }
.auth-modal .auth-shell {
  display:flex;
  flex-direction:column;
  width:min(100%,560px);
  max-width:560px;
  max-height:min(880px,calc(100vh - 40px));
  overflow:auto;
  border:1px solid rgba(255,255,255,.64);
  border-radius:28px;
  background:#fbfaf8;
  box-shadow:0 35px 110px rgba(12,10,18,.34);
}
.auth-modal .modal-close {
  position:absolute;
  top:17px;
  right:17px;
  border-color:rgba(255,255,255,.20);
  background:rgba(30,25,47,.38);
  color:rgba(255,255,255,.76);
  backdrop-filter:blur(12px);
}
.auth-modal .modal-close:hover { color:#fff; background:rgba(30,25,47,.58); }
.auth-brand-panel {
  position:relative;
  display:block;
  min-height:244px;
  padding:23px 27px 21px;
  overflow:hidden;
  border-radius:27px 27px 0 0;
  background:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.18),transparent 21%),
    linear-gradient(132deg,#27213f 0%,#413471 52%,#6d5bc2 100%);
  color:#fff;
}
.auth-brand-panel::before {
  content:"";
  position:absolute;
  top:-138px;
  right:-58px;
  width:330px;
  height:330px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.12) 0 1px,transparent 2px);
  background-size:13px 13px;
  transform:rotate(-9deg);
}
.auth-brand-panel::after {
  content:"";
  position:absolute;
  left:-40px;
  bottom:-105px;
  width:240px;
  height:190px;
  border-radius:50%;
  background:rgba(244,196,130,.13);
  filter:blur(2px);
}
.auth-brand-lockup { gap:10px; }
.auth-brand-lockup img { width:36px; height:36px; border-radius:11px; box-shadow:0 8px 24px rgba(13,10,25,.18); }
.auth-brand-lockup strong { color:#fff; font-size:15px; }
.auth-brand-lockup span { color:rgba(255,255,255,.55); font-size:8px; }
.auth-brand-copy { width:54%; margin-top:27px; }
.auth-brand-kicker { margin-bottom:9px; color:#dcd6ff; font-size:8px; }
.auth-brand-copy h2 { color:#fff; font-size:25px; line-height:1.25; }
.auth-brand-copy p { margin-top:10px; color:rgba(255,255,255,.61); font-size:10px; line-height:1.75; }
.auth-stage-visual { position:absolute; z-index:1; top:52px; right:18px; width:225px; height:174px; transform:scale(.90); transform-origin:top right; }
.auth-stage-orbit { position:absolute; top:2px; right:13px; width:150px; height:150px; border:1px solid rgba(255,255,255,.13); border-radius:50%; box-shadow:0 0 0 24px rgba(255,255,255,.025),0 0 0 48px rgba(255,255,255,.018); }
.auth-stage-orbit::before { content:""; position:absolute; top:22px; right:24px; width:8px; height:8px; border-radius:50%; background:#ffd999; box-shadow:0 0 18px rgba(255,217,153,.75); }
.auth-stage-card { position:absolute; display:grid; grid-template-columns:29px minmax(0,1fr) auto; align-items:center; gap:8px; min-width:170px; padding:10px 11px; border:1px solid rgba(255,255,255,.16); border-radius:13px; background:rgba(25,21,48,.50); box-shadow:0 14px 32px rgba(14,10,31,.22); backdrop-filter:blur(12px); }
.auth-stage-card > i { display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:rgba(255,255,255,.10); color:#e1dcff; font-size:10px; }
.auth-stage-card strong,.auth-stage-card small { display:block; }
.auth-stage-card strong { color:#fff; font-size:9px; }
.auth-stage-card small { margin-top:2px; color:rgba(255,255,255,.48); font-size:7px; }
.auth-stage-card em { color:#ffdd9f; font-size:8px; font-style:normal; font-weight:800; }
.auth-stage-card-main { top:20px; right:4px; width:205px; }
.auth-stage-card-rewrite { top:92px; left:4px; min-width:158px; transform:rotate(-3deg); }
.auth-stage-card-library { top:134px; right:0; min-width:150px; transform:rotate(2deg); }
.auth-brand-features { position:absolute; z-index:2; left:27px; bottom:18px; display:flex; gap:13px; margin:0; }
.auth-brand-features > span { display:inline-flex; align-items:center; gap:5px; color:rgba(255,255,255,.58); font-size:8px; }
.auth-brand-features i { display:grid; place-items:center; width:13px; height:13px; border:0; border-radius:50%; background:rgba(255,255,255,.11); color:#dfd9ff; font-size:5px; }
.auth-brand-foot { display:none; }
.auth-container { position:relative; padding:24px 36px 27px; overflow:visible; background:#fbfaf8; }
.auth-container::before { content:""; position:absolute; top:0; left:36px; right:36px; height:1px; background:#e7e1da; }
.auth-container .auth-tabs { position:absolute; z-index:2; top:-19px; left:50%; width:auto; min-width:250px; margin:0; padding:4px; transform:translateX(-50%); border:1px solid #e5dfd8; border-radius:13px; background:#fbfaf8; box-shadow:0 8px 24px rgba(38,32,49,.10); }
.auth-container .auth-tab { min-height:32px; padding:7px 18px; border-radius:9px; font-size:10px; white-space:nowrap; }
.auth-container .auth-tab span { margin-right:4px; color:#b1aaa3; font-family:Georgia,"Times New Roman",serif; font-size:8px; font-style:italic; }
.auth-container .auth-tab.active { color:#fff; background:#2c2735; box-shadow:none; }
.auth-container .auth-tab.active span { color:#d9d2ff; }
.auth-form-head { margin:17px 0 17px; text-align:center; }
.auth-form-kicker { margin-bottom:7px; color:#6a5fc8; font-size:8px; }
.auth-container .auth-form h2 { text-align:center; font-size:23px; }
.auth-form-head p { margin-top:6px; }
.auth-mode-tabs { width:100%; margin:0 auto 16px; border:1px solid #e7e1da; background:#f2efeb; }
.auth-mode-tab { min-height:35px; font-size:10px; }
.auth-mode-tab.is-active { background:#fff; box-shadow:0 2px 7px rgba(48,43,38,.08); }
.auth-container .form-group { margin-bottom:12px; }
.auth-container .form-group > label { font-size:10px; }
.auth-input-wrap { min-height:43px; border-radius:11px; background:#fff; }
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input { height:41px; }
.auth-legal { text-align:center; }
.auth-container .auth-submit { min-height:44px; border-color:#2c2735; background:#2c2735; box-shadow:0 9px 20px rgba(44,39,53,.18); }
.auth-container .auth-submit:hover { background:#40394e; }

@media (max-width:720px) {
  .auth-modal { align-items:center; padding:12px; overflow:auto; }
  .auth-modal .auth-shell { display:flex; width:min(100%,520px); max-height:calc(100vh - 24px); margin:auto; border-radius:22px; }
  .auth-brand-panel { min-height:235px; padding:22px 21px 20px; border-radius:21px 21px 0 0; }
  .auth-brand-copy { width:52%; margin-top:29px; }
  .auth-brand-copy h2 { font-size:21px; }
  .auth-brand-copy p { font-size:9px; }
  .auth-stage-visual { top:57px; right:13px; transform:scale(.86); transform-origin:top right; }
  .auth-brand-features { left:21px; bottom:18px; }
  .auth-container { padding:28px 25px 29px; }
  .auth-container .auth-tabs { width:auto; min-width:230px; margin:0; }
}
@media (max-width:460px) {
  .auth-modal .auth-shell { max-height:calc(100vh - 18px); }
  .auth-brand-panel { min-height:205px; }
  .auth-brand-copy { width:67%; margin-top:24px; }
  .auth-brand-copy h2 { font-size:20px; }
  .auth-stage-visual { top:66px; right:-35px; transform:scale(.62); }
  .auth-stage-card-rewrite,.auth-stage-card-library { display:none; }
  .auth-brand-features { display:none; }
  .auth-container { padding:27px 20px 26px; }
  .auth-container .auth-tabs { min-width:216px; }
  .auth-form-head { margin-top:18px; }
  .auth-container .auth-form h2 { font-size:21px; }
  .auth-code-group { grid-template-columns:minmax(0,1fr) 104px; }
}

/* ================================================================
   Public brand system
   Landing and authentication share the same semantic palette.
   The light and dark skins change surface character, not component identity.
   ================================================================ */
body {
  --brand-50:#eef6ff;
  --brand-100:#dcecff;
  --brand-200:#bddcff;
  --brand-300:#8fc5ff;
  --brand-400:#5aa6f7;
  --brand-500:#347fef;
  --brand-600:#2563d9;
  --brand-700:#1f4faf;
  --brand-page:#08121f;
  --brand-surface:#101d2d;
  --brand-surface-soft:#0d1927;
  --brand-surface-raised:#142337;
  --brand-text:#f5f9fd;
  --brand-text-secondary:#c6d2de;
  --brand-text-muted:#93a5b7;
  --brand-border:rgba(155,184,210,.16);
  --brand-shadow:0 24px 70px rgba(0,8,18,.34);
  --brand-focus:rgba(90,166,247,.30);
}
body.light-theme {
  --brand-page:#f3f8fc;
  --brand-surface:#ffffff;
  --brand-surface-soft:#eaf2f8;
  --brand-surface-raised:#f8fbfd;
  --brand-text:#142235;
  --brand-text-secondary:#43546a;
  --brand-text-muted:#596b80;
  --brand-border:#d6e2ec;
  --brand-shadow:0 22px 65px rgba(37,76,112,.12);
  --brand-focus:rgba(37,99,217,.20);
}

body.public-home-view {
  color-scheme:dark;
  background:var(--brand-page);
  color:var(--brand-text);
}
body.light-theme.public-home-view { color-scheme:light; }
body.public-home-view .navbar {
  background:rgba(8,18,31,.86);
  border-bottom-color:var(--brand-border);
  box-shadow:0 8px 30px rgba(0,8,18,.22);
}
body.light-theme.public-home-view .navbar {
  background:rgba(248,251,253,.88);
  border-bottom-color:var(--brand-border);
  box-shadow:0 8px 30px rgba(38,75,108,.08);
}
body.public-home-view .nav-brand { color:var(--brand-text); }
body.public-home-view .nav-brand img { box-shadow:0 0 0 2px rgba(90,166,247,.22); }
body.public-home-view .nav-link { color:var(--brand-text-muted); }
body.public-home-view .nav-link:hover { color:var(--brand-text); background:rgba(52,127,239,.10); }
body.public-home-view .nav-link.active {
  color:#dcecff;
  background:rgba(52,127,239,.16);
  box-shadow:inset 0 0 0 1px rgba(90,166,247,.26);
}
body.light-theme.public-home-view .nav-link.active {
  color:var(--brand-700);
  background:var(--brand-50);
  box-shadow:inset 0 0 0 1px var(--brand-200);
}
body.public-home-view .theme-toggle {
  border-color:var(--brand-border);
  background:rgba(255,255,255,.05);
  color:var(--brand-text-secondary);
}
body.light-theme.public-home-view .theme-toggle { background:#fff; }
body.public-home-view .theme-toggle:hover {
  color:var(--brand-text);
  border-color:var(--brand-400);
  box-shadow:0 8px 22px rgba(37,99,217,.16);
}
body.public-home-view #loginBtn {
  min-height:38px;
  padding:8px 17px;
  border:1px solid var(--brand-600);
  border-radius:10px;
  background:var(--brand-600);
  color:#fff;
  box-shadow:0 8px 20px rgba(37,99,217,.24);
}
body.public-home-view #loginBtn:hover {
  border-color:var(--brand-500);
  background:var(--brand-500);
  transform:translateY(-1px);
}
body.public-home-view .main-content { background:var(--brand-page); }

.public-home {
  --landing-bg:var(--brand-page);
  --landing-surface:var(--brand-surface);
  --landing-surface-soft:var(--brand-surface-soft);
  --landing-border:var(--brand-border);
  --landing-text:var(--brand-text);
  --landing-muted:var(--brand-text-muted);
  --landing-subtle:var(--brand-text-muted);
  --landing-accent:var(--brand-500);
  --landing-accent-strong:var(--brand-600);
  background:
    radial-gradient(circle at 86% 2%,rgba(52,127,239,.12),transparent 31%),
    radial-gradient(circle at 8% 44%,rgba(90,166,247,.07),transparent 26%),
    var(--landing-bg);
  color:var(--landing-text);
}
.landing-atmosphere span:first-child { background:rgba(52,127,239,.10); }
.landing-atmosphere span:last-child { background:rgba(90,166,247,.07); }
.landing-kicker,.landing-section-head > span,.landing-final-cta > div > span { color:var(--brand-400); }
.landing-hero h1 { color:var(--landing-text); }
.landing-hero h1 em {
  color:var(--brand-400);
  font-family:inherit;
  font-style:normal;
  font-weight:inherit;
  letter-spacing:inherit;
}
.landing-hero-copy > p,.landing-section-head p,.landing-capability-grid p,.landing-final-cta p { color:var(--landing-muted); }
.landing-primary {
  border-color:var(--brand-600);
  background:var(--brand-600);
  box-shadow:0 10px 26px rgba(37,99,217,.24);
}
.landing-primary:hover { border-color:var(--brand-500); background:var(--brand-500); box-shadow:0 13px 30px rgba(37,99,217,.30); }
.landing-secondary { border-color:var(--landing-border); background:rgba(255,255,255,.035); color:var(--brand-text-secondary); }
.landing-secondary:hover { border-color:var(--brand-400); background:rgba(52,127,239,.10); color:var(--brand-text); }
.landing-primary:active,.landing-secondary:active,.landing-workspace-card > button:active { transform:translateY(1px) scale(.985); }
.landing-primary:focus-visible,.landing-secondary:focus-visible,.landing-workspace-card > button:focus-visible { outline:3px solid var(--brand-focus); outline-offset:2px; }
.landing-trust { color:var(--landing-muted); }
.landing-trust i { background:rgba(52,127,239,.13); color:var(--brand-300); }
.landing-workspace-card {
  border-color:var(--landing-border);
  background:color-mix(in srgb,var(--landing-surface) 92%,transparent);
  box-shadow:var(--brand-shadow);
}
.landing-workspace-card::before { background:var(--brand-surface-soft); opacity:.72; }
.landing-workspace-top { border-bottom-color:var(--landing-border); }
.landing-workspace-top strong,.landing-topic-card strong,.landing-workflow-list span strong,.landing-workspace-card > button { color:var(--landing-text); }
.landing-workspace-top > span,.landing-topic-card > span,.landing-workflow-list span small { color:var(--landing-muted); }
.landing-status-dot { background:var(--brand-400); box-shadow:0 0 0 5px rgba(52,127,239,.13); }
.landing-topic-card { border-color:var(--landing-border); background:var(--brand-surface-raised); }
.landing-topic-card small,.landing-workflow-list .is-done > i { color:var(--brand-300); }
.landing-workflow-list > div { border-bottom-color:var(--landing-border); }
.landing-workflow-list b { border-color:var(--landing-border); color:var(--landing-muted); }
.landing-workflow-list .is-current b,.landing-workflow-list em {
  border-color:rgba(90,166,247,.35);
  color:var(--brand-300);
  background:rgba(52,127,239,.13);
}
.landing-workspace-card > button {
  border-color:var(--landing-border);
  background:var(--brand-surface-raised);
}
.landing-workspace-card > button:hover { border-color:var(--brand-400); background:rgba(52,127,239,.10); }
.landing-workspace-card > button span i { color:var(--brand-400); }
.landing-capabilities { border-top-color:var(--landing-border); }
.landing-section-head h2,.landing-capability-grid h3,.landing-final-cta h2 { color:var(--landing-text); }
.landing-capability-grid article {
  border-color:var(--landing-border);
  background:var(--landing-surface);
  box-shadow:none;
}
.landing-capability-grid article:hover { border-color:var(--brand-400); background:var(--brand-surface-raised); box-shadow:0 18px 45px rgba(0,8,18,.16); }
.landing-capability-number { color:var(--landing-muted); font-family:inherit; font-style:normal; }
.landing-capability-icon { background:rgba(52,127,239,.13); color:var(--brand-300); }
.landing-capability-meta { color:var(--landing-muted); }
.landing-final-cta { border-color:var(--landing-border); background:var(--landing-surface-soft); }

body.light-theme .public-home { background-color:var(--brand-page); }
body.light-theme .landing-kicker,body.light-theme .landing-section-head > span { color:var(--brand-600); }
body.light-theme .landing-secondary { border-color:var(--brand-border); background:#fff; color:var(--brand-text-secondary); }
body.light-theme .landing-secondary:hover { border-color:var(--brand-400); background:var(--brand-50); color:var(--brand-700); }
body.light-theme .landing-trust i { background:var(--brand-50); color:var(--brand-600); }
body.light-theme .landing-workspace-card,body.light-theme .landing-capability-grid article { box-shadow:0 14px 40px rgba(37,76,112,.08); }
body.light-theme .landing-capability-grid article:hover { box-shadow:0 18px 45px rgba(37,76,112,.12); }
body.light-theme .landing-workspace-card > button { background:#fff; }

/* Authentication inherits the same brand tokens and visibly follows 换肤. */
.auth-modal { background:rgba(1,8,18,.68); }
.auth-modal .auth-shell {
  border-color:var(--brand-border);
  background:var(--brand-surface);
  box-shadow:0 35px 110px rgba(0,8,18,.46);
}
.auth-brand-panel {
  background:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.14),transparent 21%),
    linear-gradient(132deg,#0f3158 0%,#174d83 52%,#2878be 100%);
}
.auth-brand-panel::after { background:rgba(143,197,255,.14); }
.auth-brand-kicker,.auth-stage-card > i,.auth-brand-features i { color:#dcecff; }
.auth-stage-orbit::before { background:#8fc5ff; box-shadow:0 0 18px rgba(143,197,255,.75); }
.auth-stage-card { background:rgba(5,28,54,.56); }
.auth-stage-card em { color:#bddcff; }
.auth-container { background:var(--brand-surface); color:var(--brand-text); }
.auth-container::before { background:var(--brand-border); }
.auth-container .auth-tabs {
  border-color:var(--brand-border);
  background:var(--brand-surface);
  box-shadow:0 8px 24px rgba(0,8,18,.20);
}
.auth-container .auth-tab { color:var(--brand-text-muted); }
.auth-container .auth-tab span { color:var(--brand-text-muted); font-family:inherit; font-style:normal; }
.auth-container .auth-tab.active { color:#fff; background:var(--brand-600); }
.auth-container .auth-tab.active span { color:var(--brand-100); }
.auth-form-kicker { color:var(--brand-400); }
.auth-container .auth-form h2 { color:var(--brand-text); }
.auth-form-head p,.auth-legal,.auth-agree-label { color:var(--brand-text-muted); }
.auth-mode-tabs { border-color:var(--brand-border); background:var(--brand-surface-soft); }
.auth-mode-tab { color:var(--brand-text-muted); }
.auth-mode-tab.is-active { color:var(--brand-text); background:var(--brand-surface-raised); box-shadow:0 2px 8px rgba(0,8,18,.16); }
.auth-container .form-group > label { color:var(--brand-text-secondary); }
.auth-input-wrap { border-color:var(--brand-border); background:var(--brand-surface-raised); }
.auth-input-wrap:focus-within { border-color:var(--brand-400); box-shadow:0 0 0 3px var(--brand-focus); }
.auth-input-wrap > i,.auth-input-wrap > span { color:var(--brand-text-muted); }
.auth-input-wrap > span { border-right-color:var(--brand-border); }
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input { color:var(--brand-text) !important; }
.auth-container .auth-input-wrap input::placeholder { color:var(--brand-text-muted) !important; }
.auth-code-group .btn {
  border-color:var(--brand-border);
  background:var(--brand-surface-soft);
  color:var(--brand-text-secondary);
}
.auth-code-group .btn:hover { border-color:var(--brand-400); background:rgba(52,127,239,.12); color:var(--brand-text); }
.auth-legal a,.auth-agree-label a { color:var(--brand-400); }
.auth-agree-label input[type="checkbox"] { accent-color:var(--brand-600); }
.auth-container .auth-submit {
  border-color:var(--brand-600);
  background:var(--brand-600);
  box-shadow:0 10px 24px rgba(37,99,217,.25);
}
.auth-container .auth-submit:hover { background:var(--brand-500); box-shadow:0 13px 28px rgba(37,99,217,.31); }
.auth-container .auth-submit:active { transform:translateY(1px) scale(.99); }
.auth-modal .modal-close { border-color:rgba(255,255,255,.22); background:rgba(5,28,54,.45); }

body.light-theme .auth-modal { background:rgba(15,35,54,.44); }
body.light-theme .auth-modal .auth-shell { box-shadow:0 35px 100px rgba(30,66,99,.24); }
body.light-theme .auth-container .auth-tabs { box-shadow:0 8px 24px rgba(37,76,112,.10); }
body.light-theme .auth-mode-tab.is-active { background:#fff; box-shadow:0 2px 8px rgba(37,76,112,.09); }
body.light-theme .auth-input-wrap { background:#fff; }
body.light-theme .auth-code-group .btn { background:var(--brand-surface-soft); }

@media (max-width:720px) {
  body.public-home-view .nav-menu { background:color-mix(in srgb,var(--brand-surface) 97%,transparent) !important; border-top-color:var(--brand-border); }
  body.public-home-view .nav-link { color:var(--brand-text-secondary) !important; background:var(--brand-surface-raised); border-color:var(--brand-border); }
  body.public-home-view .nav-link.active { color:var(--brand-300) !important; border-color:var(--brand-400); }
  body.light-theme.public-home-view .nav-link.active { color:var(--brand-700) !important; }
  body.public-home-view .nav-toggle { color:var(--brand-text) !important; }
}

@media (prefers-reduced-motion:reduce) {
  .auth-modal.active,.auth-modal .auth-shell { animation:none; }
  .landing-capability-grid article,.landing-primary,.landing-secondary,.landing-workspace-card > button { transition:none; }
}

/* ================================================================
   Premium authentication composition
   Wide editorial stage + disciplined form panel, shared by both skins.
   ================================================================ */
.auth-modal {
  padding:clamp(18px,3vw,48px);
  background:rgba(17,43,70,.56);
  backdrop-filter:blur(18px) saturate(108%);
  -webkit-backdrop-filter:blur(18px) saturate(108%);
}
.auth-modal .auth-shell {
  display:grid;
  grid-template-columns:minmax(420px,1.12fr) minmax(420px,.88fr);
  width:min(1120px,calc(100vw - 64px));
  max-width:1120px;
  max-height:min(760px,calc(100dvh - 64px));
  overflow:hidden;
  border:1px solid #8ebec5;
  border-radius:22px;
  background:#f7f9f0;
  box-shadow:0 42px 110px rgba(17,43,70,.30),0 0 0 1px rgba(255,255,255,.62) inset;
}
.auth-modal .modal-close {
  z-index:6;
  top:20px;
  right:20px;
  width:40px;
  height:40px;
  border:1px solid #b8d4d2;
  border-radius:12px;
  background:#e0e4cc;
  color:#112b46;
  box-shadow:0 8px 24px rgba(17,43,70,.13);
  backdrop-filter:none;
}
.auth-modal .modal-close:hover { color:#112b46; border-color:#f38630; background:#ffd6b4; transform:none; }

.auth-brand-panel {
  position:relative;
  min-height:670px;
  padding:38px 42px 36px;
  border-radius:0;
  background:
    linear-gradient(180deg,rgba(167,219,216,.02) 0%,rgba(105,210,231,.04) 48%,rgba(224,228,204,.30) 100%),
    linear-gradient(90deg,rgba(105,210,231,.18) 0%,rgba(167,219,216,.06) 50%,rgba(255,255,255,0) 76%),
    url("../assets/auth-anime-study-v5.webp") center/cover no-repeat,
    #a7dbd8;
  color:#112b46;
  isolation:isolate;
}
.auth-brand-panel::before {
  content:"";
  position:absolute;
  inset:0;
  width:auto;
  height:auto;
  border:0;
  border-radius:0;
  background:linear-gradient(180deg,rgba(255,255,255,.23),transparent 25%);
  transform:none;
  pointer-events:none;
}
.auth-brand-panel::after {
  content:"";
  position:absolute;
  left:42px;
  right:42px;
  bottom:83px;
  width:auto;
  height:1px;
  border-radius:0;
  background:rgba(17,43,70,.26);
  filter:none;
}
.auth-brand-lockup { position:relative; z-index:2; gap:12px; }
.auth-brand-lockup img { width:42px; height:42px; border-radius:12px; box-shadow:0 12px 30px rgba(17,43,70,.19); }
.auth-brand-lockup strong { color:#112b46; font-size:17px; font-weight:850; letter-spacing:-.02em; }
.auth-brand-lockup span { margin-top:2px; color:#405b70; font-size:10px; letter-spacing:.06em; }
.auth-brand-copy {
  position:absolute;
  z-index:2;
  left:42px;
  right:42px;
  bottom:126px;
  width:auto;
  margin:0;
}
.auth-brand-kicker {
  margin-bottom:14px;
  color:#a33b00;
  font-size:10px;
  font-weight:800;
  letter-spacing:.18em;
}
.auth-brand-copy h2 {
  max-width:520px;
  color:#112b46;
  font-size:clamp(34px,3.3vw,48px);
  font-weight:850;
  letter-spacing:-.055em;
  line-height:1.17;
  text-shadow:0 1px 0 rgba(255,255,255,.82),0 10px 28px rgba(255,255,255,.52);
}
.auth-brand-copy p {
  max-width:470px;
  margin-top:17px;
  color:#334f66;
  font-size:13px;
  line-height:1.8;
  text-shadow:0 1px 0 rgba(255,255,255,.7);
}
.auth-brand-features {
  position:absolute;
  z-index:2;
  left:42px;
  right:42px;
  bottom:34px;
  display:flex;
  justify-content:space-between;
  gap:24px;
  margin:0;
}
.auth-brand-features > span {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#28465f;
  font-size:10px;
  font-weight:650;
}
.auth-brand-features i {
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
  border:1px solid #e87527;
  border-radius:50%;
  background:#ffd8b8;
  color:#9a3900;
  font-size:7px;
}
.auth-stage-visual { display:none; }

.auth-container {
  position:relative;
  min-width:0;
  padding:52px 54px 44px;
  overflow-y:auto;
  background:#f7f9f0;
  color:#112b46;
}
.auth-container::before { display:none; }
.auth-container .auth-tabs {
  position:static;
  width:100%;
  min-width:0;
  margin:0 0 38px;
  padding:0;
  transform:none;
  border:0;
  border-bottom:1px solid #c9d2c3;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.auth-container .auth-tab {
  min-height:47px;
  padding:0 6px 14px;
  border-radius:0;
  color:#5b6e7b;
  font-size:13px;
  font-weight:750;
  text-align:left;
}
.auth-container .auth-tab span { display:none; }
.auth-container .auth-tab.active { color:#112b46; background:transparent; box-shadow:inset 0 -2px 0 #f38630; }
.auth-form-head { margin:0 0 28px; text-align:left; }
.auth-form-kicker {
  margin-bottom:10px;
  color:#a33b00;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
}
.auth-container .auth-form h2 {
  color:#112b46;
  text-align:left;
  font-size:30px;
  font-weight:850;
  letter-spacing:-.045em;
  line-height:1.25;
}
.auth-form-head p { margin-top:8px; color:#526678; font-size:13px; }
.auth-mode-tabs {
  width:100%;
  margin:0 0 25px;
  padding:4px;
  border:1px solid #c6d3cb;
  border-radius:12px;
  background:#e7ecdd;
}
.auth-mode-tab {
  min-height:40px;
  border-radius:9px;
  color:#526678;
  font-size:12px;
  font-weight:750;
}
.auth-mode-tab.is-active { color:#112b46; background:#fff; box-shadow:0 3px 10px rgba(17,43,70,.11),inset 0 -2px 0 rgba(243,134,48,.72); }
.auth-container .form-group { margin-bottom:18px; }
.auth-container .form-group > label { margin-bottom:8px; color:#29465d; font-size:12px; font-weight:750; }
.auth-input-wrap {
  min-height:52px;
  padding:0 15px;
  border:1px solid #8aa6ad;
  border-radius:11px;
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(17,43,70,.025);
}
.auth-input-wrap:focus-within { border-color:#f38630; box-shadow:0 0 0 3px rgba(243,134,48,.20); }
.auth-input-wrap > i { width:23px; color:#587080; font-size:12px; }
.auth-input-wrap > span { padding-right:13px; border-right-color:#cad5d3; color:#334f66; font-size:12px; }
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input {
  height:50px;
  color:#112b46 !important;
  caret-color:#e76818;
  font-size:13px;
}
.auth-container .auth-input-wrap input::placeholder { color:#607483 !important; opacity:1; }
.auth-code-group { gap:10px; }
.auth-code-group .btn {
  flex-basis:120px;
  border:1px solid #7798a3;
  border-radius:11px;
  background:#fff;
  color:#294b63;
  font-size:11px;
}
.auth-code-group .btn:hover { border-color:#f38630; background:#fff1e6; color:#9a3900; }
.auth-code-group .btn:disabled { color:#63747f; background:#e6ebe1; opacity:1; }
.auth-legal { margin:3px 0 18px; color:#566b78; font-size:10px; text-align:left; }
.auth-legal a,.auth-agree-label a { color:#a33b00; }
.auth-container .auth-submit {
  min-height:52px;
  border:1px solid #e75f0a;
  border-radius:11px;
  background:#fa6900;
  color:#112b46;
  font-size:13px;
  font-weight:850;
  box-shadow:0 14px 30px rgba(250,105,0,.25);
}
.auth-container .auth-submit:hover { border-color:#d85300; background:#f38630; box-shadow:0 16px 34px rgba(243,134,48,.32); }
.auth-agree-label { color:#526678; font-size:10px; }
.auth-agree-label input[type="checkbox"] { accent-color:#f38630; }

/* Dark skin keeps the same hierarchy with materially stronger contrast. */
body:not(.light-theme) .auth-modal { background:rgba(8,25,42,.72); }
body:not(.light-theme) .auth-modal .auth-shell { border-color:#4b7182; background:#132b43; box-shadow:0 44px 118px rgba(4,18,31,.58),0 0 0 1px rgba(105,210,231,.14) inset; }
body:not(.light-theme) .auth-modal .modal-close { border-color:#557b88; background:#203e54; color:#e0e4cc; box-shadow:0 8px 24px rgba(4,18,31,.28); }
body:not(.light-theme) .auth-modal .modal-close:hover { border-color:#f38630; background:#5b4135; color:#fff; }
body:not(.light-theme) .auth-container { background:#132b43; color:#edf5ea; }
body:not(.light-theme) .auth-container .auth-tabs { border-bottom-color:#38576c; }
body:not(.light-theme) .auth-container .auth-tab { color:#b4cdd0; }
body:not(.light-theme) .auth-container .auth-tab.active { color:#f4f8eb; box-shadow:inset 0 -2px 0 #f38630; }
body:not(.light-theme) .auth-form-kicker { color:#ffa568; }
body:not(.light-theme) .auth-container .auth-form h2 { color:#f3f7e8; }
body:not(.light-theme) .auth-form-head p { color:#b7cbd0; }
body:not(.light-theme) .auth-mode-tabs { border-color:#47677a; background:#1a354c; }
body:not(.light-theme) .auth-mode-tab { color:#b7cbd0; }
body:not(.light-theme) .auth-mode-tab.is-active { color:#132b43; background:#a7dbd8; box-shadow:0 3px 10px rgba(3,16,28,.25),inset 0 -2px 0 #f38630; }
body:not(.light-theme) .auth-container .form-group > label { color:#d9e5dd; }
body:not(.light-theme) .auth-input-wrap { border-color:#557689; background:#1a354c; }
body:not(.light-theme) .auth-input-wrap:focus-within { border-color:#f38630; box-shadow:0 0 0 3px rgba(243,134,48,.24); }
body:not(.light-theme) .auth-input-wrap > i,
body:not(.light-theme) .auth-input-wrap > span { color:#b7cbd0; }
body:not(.light-theme) .auth-input-wrap > span { border-right-color:#496a7d; }
body:not(.light-theme) .auth-container .auth-input-wrap input { color:#f3f7ea !important; caret-color:#ff9b57; }
body:not(.light-theme) .auth-container .auth-input-wrap input::placeholder { color:#b4cdd0 !important; }
body:not(.light-theme) .auth-code-group .btn { border-color:#668797; background:#203e54; color:#e8efdf; }
body:not(.light-theme) .auth-code-group .btn:hover { border-color:#f38630; background:#5d4337; color:#fff; }
body:not(.light-theme) .auth-code-group .btn:disabled { background:#29475c; color:#abc1c8; }
body:not(.light-theme) .auth-legal,
body:not(.light-theme) .auth-agree-label { color:#b7cbd0; }
body:not(.light-theme) .auth-legal a,
body:not(.light-theme) .auth-agree-label a { color:#ffa568; }
body:not(.light-theme) .auth-container .auth-submit { border-color:#f38630; background:#f38630; color:#112b46; box-shadow:0 14px 30px rgba(2,14,25,.36); }
body:not(.light-theme) .auth-container .auth-submit:hover { border-color:#fa6900; background:#fa6900; color:#112b46; }

body.light-theme .auth-modal { background:rgba(17,43,70,.45); }
body.light-theme .auth-modal .auth-shell { border-color:#9fc7ca; background:#f7f9f0; box-shadow:0 42px 108px rgba(17,43,70,.26),0 0 0 1px rgba(255,255,255,.74) inset; }
body.light-theme .auth-brand-panel { filter:none; }
body.light-theme .auth-container { background:#f7f9f0; }
body.light-theme .auth-input-wrap { background:#fff; }

@media (max-width:900px) {
  .auth-modal .auth-shell { grid-template-columns:minmax(310px,.8fr) minmax(390px,1fr); width:min(880px,calc(100vw - 36px)); }
  .auth-brand-panel { padding:32px; }
  .auth-brand-copy { left:32px; right:32px; }
  .auth-brand-panel::after,.auth-brand-features { left:32px; right:32px; }
  .auth-container { padding:48px 40px 40px; }
}
@media (max-width:720px) {
  .auth-modal { align-items:flex-start; padding:12px; overflow:auto; }
  .auth-modal .auth-shell {
    display:flex;
    width:min(100%,540px);
    max-height:none;
    margin:auto;
    border-radius:16px;
  }
  .auth-brand-panel { min-height:214px; padding:24px; border-radius:0; }
  .auth-brand-lockup img { width:36px; height:36px; }
  .auth-brand-copy { left:24px; right:24px; bottom:28px; }
  .auth-brand-copy h2 { max-width:340px; font-size:27px; }
  .auth-brand-copy p { display:none; }
  .auth-brand-panel::after,.auth-brand-features { display:none; }
  .auth-container { padding:36px 25px 30px; }
  .auth-container .auth-tabs { margin-bottom:28px; }
  .auth-container .auth-form h2 { font-size:26px; }
}
@media (max-width:460px) {
  .auth-modal .auth-shell { max-height:none; }
  .auth-brand-panel { min-height:184px; padding:20px; }
  .auth-brand-copy { left:20px; right:20px; bottom:23px; }
  .auth-brand-copy h2 { font-size:23px; }
  .auth-container { padding:31px 20px 26px; }
  .auth-code-group { grid-template-columns:minmax(0,1fr) 108px; }
}

@media (prefers-reduced-transparency:reduce) {
  .auth-modal { background:rgba(13,34,55,.90); backdrop-filter:none; -webkit-backdrop-filter:none; }
}

/* ================================================================
   Authentication refinement
   Tighter rhythm, clearer control hierarchy and complete form states.
   ================================================================ */
.auth-modal .auth-shell {
  grid-template-columns:minmax(0,1.08fr) minmax(430px,.92fr);
  width:min(1048px,calc(100vw - 56px));
  max-width:1048px;
  max-height:min(720px,calc(100dvh - 48px));
  border-radius:18px;
  box-shadow:0 34px 88px rgba(17,43,70,.28),0 0 0 1px rgba(255,255,255,.66) inset;
}
.auth-modal .modal-close {
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  border-radius:10px;
  background:rgba(247,249,240,.88);
  box-shadow:0 7px 18px rgba(17,43,70,.10);
  font-size:12px;
}
.auth-modal .modal-close:active { transform:translateY(1px); }
.auth-modal .modal-close:focus-visible,
.auth-tab:focus-visible,
.auth-mode-tab:focus-visible,
.auth-password-toggle:focus-visible,
.auth-code-group .btn:focus-visible,
.auth-submit:focus-visible,
.auth-agree-label input:focus-visible {
  outline:3px solid rgba(243,134,48,.35);
  outline-offset:2px;
}

.auth-brand-panel {
  min-height:640px;
  padding:30px 32px 28px;
  background-position:center;
}
.auth-brand-panel::before {
  background:
    linear-gradient(90deg,rgba(105,210,231,.18) 0%,rgba(167,219,216,.04) 58%,transparent 78%),
    linear-gradient(0deg,rgba(224,228,204,.48) 0%,rgba(224,228,204,.08) 34%,transparent 54%),
    linear-gradient(180deg,rgba(255,255,255,.20),transparent 23%);
}
.auth-brand-panel::after {
  left:32px;
  right:32px;
  bottom:62px;
  background:rgba(17,43,70,.22);
}
.auth-brand-lockup { gap:10px; }
.auth-brand-lockup img {
  width:38px;
  height:38px;
  border-radius:11px;
  box-shadow:0 9px 24px rgba(17,43,70,.16);
}
.auth-brand-lockup strong { font-size:16px; }
.auth-brand-lockup span { font-size:9px; }
.auth-brand-copy {
  left:32px;
  right:32px;
  bottom:91px;
  max-width:400px;
}
.auth-brand-kicker {
  margin-bottom:10px;
  font-size:9px;
  letter-spacing:.15em;
}
.auth-brand-copy h2 {
  max-width:390px;
  font-size:clamp(31px,3vw,39px);
  letter-spacing:-.048em;
  line-height:1.15;
}
.auth-brand-copy p {
  max-width:390px;
  margin-top:13px;
  font-size:12px;
  line-height:1.65;
}
.auth-brand-features {
  left:32px;
  right:32px;
  bottom:21px;
  justify-content:flex-start;
  gap:26px;
}
.auth-brand-features > span { gap:7px; font-size:9px; }
.auth-brand-features i { width:16px; height:16px; font-size:6px; }

.auth-container {
  padding:30px 40px 30px;
  scrollbar-gutter:stable;
}
.auth-container .auth-tabs,
.auth-container .auth-form {
  width:100%;
  max-width:392px;
  margin-left:auto;
  margin-right:auto;
}
.auth-container .auth-tabs {
  margin-bottom:25px;
  border-bottom-color:#ccd5c8;
}
.auth-container .auth-tab {
  min-height:42px;
  padding:0 4px 12px;
  font-size:12px;
  letter-spacing:.01em;
}
.auth-container .auth-tab::after { display:none; }
.auth-container .auth-tab.active { box-shadow:inset 0 -2px 0 #f38630; }
.auth-form[aria-hidden="true"] { display:none; }
.auth-form-head { margin:0 0 21px; }
.auth-form-kicker {
  margin-bottom:7px;
  font-size:9px;
  letter-spacing:.08em;
}
.auth-container .auth-form h2 {
  font-size:27px;
  letter-spacing:-.038em;
  line-height:1.22;
}
.auth-form-head p { margin-top:6px; font-size:11px; line-height:1.55; }
.auth-mode-tabs {
  margin-bottom:17px;
  padding:3px;
  border-radius:11px;
  background:#e9eddf;
}
.auth-mode-tab {
  min-height:35px;
  border-radius:8px;
  font-size:11px;
}
.auth-mode-tab:active { transform:translateY(1px); }
.auth-mode-tab.is-active {
  box-shadow:0 2px 8px rgba(17,43,70,.09),inset 0 -2px 0 rgba(243,134,48,.72);
}
.auth-container .form-group {
  position:relative;
  margin-bottom:7px;
}
.auth-container .form-group > label {
  margin-bottom:6px;
  font-size:11px;
  line-height:1.35;
}
.auth-input-wrap {
  min-height:47px;
  padding:0 13px;
  border-radius:12px;
  transition:border-color 150ms ease,box-shadow 150ms ease,background-color 150ms ease;
}
.auth-input-wrap:hover { border-color:#718f9a; }
.auth-input-wrap > i { width:21px; font-size:11px; }
.auth-input-wrap > span { padding-right:11px; font-size:11px; }
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input {
  height:45px;
  padding-left:9px;
  font-size:12px;
}
.auth-input-wrap input:-webkit-autofill {
  -webkit-text-fill-color:#112b46;
  box-shadow:0 0 0 1000px #fff inset !important;
}
.auth-password-wrap input { padding-right:4px !important; }
.auth-password-toggle {
  display:grid;
  flex:0 0 34px;
  place-items:center;
  width:34px;
  height:34px;
  margin-right:-7px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#607483;
  cursor:pointer;
  transition:background-color 150ms ease,color 150ms ease,transform 150ms ease;
}
.auth-password-toggle:hover { background:#edf2ea; color:#112b46; }
.auth-password-toggle:active { transform:translateY(1px); }
.auth-field-message,
.auth-form-message {
  min-height:16px;
  margin:4px 2px 0;
  color:#a12f12;
  font-size:9px;
  font-weight:650;
  line-height:1.35;
}
.auth-field-message.auth-field-hint { color:#667783; font-weight:500; }
.auth-form-message { margin:0 2px 7px; text-align:center; }
.auth-container .form-group.has-error .auth-input-wrap {
  border-color:#c44725;
  background:#fffaf7;
  box-shadow:0 0 0 3px rgba(196,71,37,.11);
}
.auth-container .form-group.has-error > label { color:#8f2d14; }
.auth-code-group { gap:8px; }
.auth-code-group .btn {
  flex-basis:108px;
  min-height:47px;
  border-radius:12px;
  font-size:10px;
  transition:border-color 150ms ease,background-color 150ms ease,color 150ms ease,transform 150ms ease;
}
.auth-code-group .btn:active { transform:translateY(1px); }
.auth-legal {
  margin:0 0 11px;
  font-size:9px;
  line-height:1.55;
}
.auth-legal a,.auth-agree-label a { text-underline-offset:2px; }
.auth-container .auth-submit {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:47px;
  border-radius:12px;
  font-size:12px;
  letter-spacing:.02em;
  box-shadow:0 10px 24px rgba(250,105,0,.20);
  transition:background-color 150ms ease,border-color 150ms ease,box-shadow 150ms ease,transform 150ms ease;
}
.auth-container .auth-submit:hover {
  transform:translateY(-1px);
  box-shadow:0 13px 27px rgba(243,134,48,.27);
}
.auth-container .auth-submit:active { transform:translateY(1px); box-shadow:0 6px 15px rgba(243,134,48,.22); }
.auth-container .auth-submit:disabled { cursor:wait; opacity:.76; transform:none; box-shadow:none; }
.auth-container .auth-submit.is-loading::before {
  content:"";
  width:12px;
  height:12px;
  border:2px solid rgba(17,43,70,.30);
  border-top-color:#112b46;
  border-radius:50%;
  animation:auth-button-spin .7s linear infinite;
}
@keyframes auth-button-spin { to { transform:rotate(360deg); } }
.auth-agree { margin-top:1px; }
.auth-agree-label { align-items:flex-start; font-size:9px; line-height:1.55; }
.auth-agree-label input[type="checkbox"] { width:15px; height:15px; margin-top:0; }
.auth-register-passwords { gap:9px; }

body:not(.light-theme) .auth-modal .modal-close { background:rgba(32,62,84,.88); }
body:not(.light-theme) .auth-container .auth-tabs { border-bottom-color:#3a586c; }
body:not(.light-theme) .auth-mode-tabs { background:#1b354b; }
body:not(.light-theme) .auth-input-wrap:hover { border-color:#7197a7; }
body:not(.light-theme) .auth-password-toggle { color:#b4cdd0; }
body:not(.light-theme) .auth-password-toggle:hover { background:#28475c; color:#f3f7e8; }
body:not(.light-theme) .auth-input-wrap input:-webkit-autofill {
  -webkit-text-fill-color:#f3f7ea;
  box-shadow:0 0 0 1000px #1a354c inset !important;
}
body:not(.light-theme) .auth-field-message,
body:not(.light-theme) .auth-form-message { color:#ffb19a; }
body:not(.light-theme) .auth-field-message.auth-field-hint { color:#b4c7cc; }
body:not(.light-theme) .auth-container .form-group.has-error .auth-input-wrap {
  border-color:#ff8c68;
  background:#24384a;
  box-shadow:0 0 0 3px rgba(255,140,104,.15);
}
body:not(.light-theme) .auth-container .form-group.has-error > label { color:#ffc2ad; }

@media (max-width:900px) {
  .auth-modal .auth-shell {
    grid-template-columns:minmax(320px,.84fr) minmax(400px,1.16fr);
    width:min(860px,calc(100vw - 32px));
  }
  .auth-brand-panel { padding:28px; }
  .auth-brand-copy { left:28px; right:28px; bottom:91px; }
  .auth-brand-copy h2 { font-size:31px; }
  .auth-brand-panel::after,.auth-brand-features { left:28px; right:28px; }
  .auth-container { padding:30px 32px; }
}
@media (max-width:760px) {
  .auth-modal { padding:10px; }
  .auth-modal .auth-shell {
    display:flex;
    width:min(100%,520px);
    max-height:none;
    border-radius:16px;
  }
  .auth-brand-panel {
    min-height:188px;
    padding:20px;
    background-position:center 42%;
  }
  .auth-brand-lockup img { width:34px; height:34px; }
  .auth-brand-copy { left:20px; right:72px; bottom:22px; }
  .auth-brand-kicker { margin-bottom:6px; font-size:8px; }
  .auth-brand-copy h2 { max-width:300px; font-size:22px; line-height:1.16; }
  .auth-brand-copy p,.auth-brand-panel::after,.auth-brand-features { display:none; }
  .auth-container { padding:27px 24px 25px; }
  .auth-container .auth-tabs { margin-bottom:22px; }
  .auth-container .auth-form h2 { font-size:24px; }
}
@media (max-width:460px) {
  .auth-brand-panel { min-height:164px; }
  .auth-brand-copy h2 { font-size:20px; }
  .auth-container { padding:24px 18px; }
  .auth-code-group { grid-template-columns:minmax(0,1fr) 102px; }
  .auth-register-passwords { grid-template-columns:1fr; gap:0; }
}

@media (prefers-reduced-motion:reduce) {
  .auth-modal .modal-close,
  .auth-mode-tab,
  .auth-password-toggle,
  .auth-code-group .btn,
  .auth-container .auth-submit { transition:none; }
  .auth-container .auth-submit.is-loading::before { animation:none; }
}

/* ================================================================
   Ocean Drift product palette
   One five-colour family now drives both skins and every product page.
   Cyan is the primary interaction colour; orange is reserved for alerts.
   ================================================================ */
body {
  --ocean-cyan:#69d2e7;
  --ocean-mint:#a7dbd8;
  --ocean-mist:#e0e4cc;
  --ocean-orange:#f38630;
  --ocean-orange-strong:#fa6900;
  --ocean-ink:#112b46;
  --ocean-ink-soft:#315166;
  --ocean-night:#0b2234;
  --ocean-night-raised:#102d42;
  --ocean-night-soft:#16384d;
  --ocean-line:rgba(167,219,216,.20);
  --ocean-line-strong:rgba(105,210,231,.38);
  --ocean-focus:rgba(105,210,231,.28);
  --ocean-shadow:0 18px 46px rgba(3,23,37,.24);
  --ui-page:var(--ocean-night);
  --ui-surface:var(--ocean-night-raised);
  --ui-surface-soft:var(--ocean-night-soft);
  --ui-text:#f1f6ed;
  --ui-text-secondary:#c4dad7;
  --ui-text-muted:#92b2b5;
  --ui-border:var(--ocean-line);
  --ui-shadow:var(--ocean-shadow);
  --brand-50:#effaf9;
  --brand-100:#d7f2f1;
  --brand-200:#b9e7e4;
  --brand-300:var(--ocean-mint);
  --brand-400:var(--ocean-cyan);
  --brand-500:#54bfd4;
  --brand-600:#2f8494;
  --brand-700:#226573;
  --brand-page:var(--ocean-night);
  --brand-surface:var(--ocean-night-raised);
  --brand-surface-soft:var(--ocean-night-soft);
  --brand-surface-raised:#193d52;
  --brand-text:#f1f6ed;
  --brand-text-secondary:#c4dad7;
  --brand-text-muted:#92b2b5;
  --brand-border:var(--ocean-line);
  --brand-shadow:var(--ocean-shadow);
  --brand-focus:var(--ocean-focus);
  --accent-50:#effaf9;
  --accent-100:#d7f2f1;
  --accent-200:#b9e7e4;
  --accent-300:var(--ocean-mint);
  --accent-400:var(--ocean-cyan);
  --accent-500:#54bfd4;
  --accent-600:#2f8494;
  --accent-700:#226573;
  --accent-800:#174957;
  --accent-focus:var(--ocean-focus);
  --accent-shadow:rgba(31,111,126,.18);
  --primary-color:var(--brand-600);
  --primary-dark:var(--brand-700);
  --primary-light:var(--ocean-cyan);
  --bg-primary:var(--ui-surface);
  --bg-secondary:var(--ui-page);
  --bg-tertiary:var(--ui-surface-soft);
  --text-primary:var(--ui-text);
  --text-secondary:var(--ui-text-secondary);
  --text-tertiary:var(--ui-text-muted);
  --border-color:var(--ui-border);
  color-scheme:dark;
  background:var(--ui-page);
  color:var(--ui-text);
}
body.light-theme {
  --ui-page:#f4f8f1;
  --ui-surface:#ffffff;
  --ui-surface-soft:#edf4ec;
  --ui-text:var(--ocean-ink);
  --ui-text-secondary:#3f5f70;
  --ui-text-muted:#5c737b;
  --ui-border:#cadbd5;
  --ui-shadow:0 16px 40px rgba(46,92,99,.10);
  --brand-page:#f4f8f1;
  --brand-surface:#ffffff;
  --brand-surface-soft:#edf4ec;
  --brand-surface-raised:#f9fcf7;
  --brand-text:var(--ocean-ink);
  --brand-text-secondary:#3f5f70;
  --brand-text-muted:#5c737b;
  --brand-border:#cadbd5;
  --brand-shadow:0 18px 48px rgba(46,92,99,.11);
  --brand-focus:rgba(47,132,148,.20);
  --bg-primary:#fff;
  --bg-secondary:#f4f8f1;
  --bg-tertiary:#edf4ec;
  --text-primary:var(--ocean-ink);
  --text-secondary:#3f5f70;
  --text-tertiary:#5c737b;
  --border-color:#cadbd5;
  color-scheme:light;
  background:var(--ui-page);
  color:var(--ui-text);
}

body:not(.light-theme),
body:not(.light-theme) .main-content { background:var(--ui-page); color:var(--ui-text); }
body.light-theme,
body.light-theme .main-content {
  background:linear-gradient(180deg,#f9fbf5 0%,var(--ui-page) 100%);
  color:var(--ui-text);
}

/* Navigation and shared controls */
.navbar,
body.public-home-view .navbar {
  background:color-mix(in srgb,var(--ui-page) 88%,transparent);
  border-bottom-color:var(--ui-border);
  box-shadow:0 6px 24px rgba(4,28,42,.14);
}
body.light-theme .navbar,
body.light-theme.public-home-view .navbar {
  background:rgba(249,252,247,.90);
  border-bottom-color:var(--ui-border);
  box-shadow:0 5px 22px rgba(46,92,99,.07);
}
.nav-brand,.username { color:var(--ui-text); }
.nav-brand img { box-shadow:0 0 0 2px rgba(105,210,231,.22); }
.nav-link,body.public-home-view .nav-link { color:var(--ui-text-muted); }
.nav-link:hover,body.public-home-view .nav-link:hover { background:rgba(105,210,231,.09); color:var(--ui-text); }
.nav-link.active,body.public-home-view .nav-link.active {
  background:rgba(105,210,231,.14);
  color:var(--ocean-cyan);
  box-shadow:inset 0 0 0 1px rgba(105,210,231,.20);
}
body.light-theme .nav-link.active,body.light-theme.public-home-view .nav-link.active {
  background:#dff3ef;
  color:#174957;
  box-shadow:none;
}
body.light-theme .nav-link.active::after { background:var(--brand-600); }
.theme-toggle,body.public-home-view .theme-toggle {
  border-color:var(--ui-border);
  background:rgba(167,219,216,.08);
  color:var(--ui-text-secondary);
}
.theme-toggle:hover,body.public-home-view .theme-toggle:hover {
  border-color:var(--ocean-cyan);
  background:rgba(105,210,231,.12);
  color:var(--ui-text);
  box-shadow:0 7px 20px rgba(31,111,126,.14);
}
.theme-toggle-icon { color:var(--ocean-orange); }
.theme-toggle.is-light { border-color:#b9d7d3; background:#fff; color:#3f5f70; }
.theme-toggle.is-light .theme-toggle-icon { color:var(--brand-600); }
.theme-toggle.is-light .theme-toggle-orbit { background:rgba(105,210,231,.18); }

.btn-primary,
body.public-home-view #loginBtn,
.landing-primary {
  border-color:#50bdd2;
  background:var(--ocean-cyan);
  color:var(--ocean-ink);
  box-shadow:0 9px 22px rgba(31,111,126,.20);
}
.btn-primary:hover,
body.public-home-view #loginBtn:hover,
.landing-primary:hover {
  border-color:#45afc4;
  background:#5bc7dc;
  color:var(--ocean-ink);
  box-shadow:0 12px 27px rgba(31,111,126,.25);
}
.btn-secondary {
  border-color:var(--ui-border);
  background:var(--ui-surface-soft);
  color:var(--ui-text-secondary);
}
.btn-secondary:hover { border-color:var(--ocean-cyan); background:rgba(105,210,231,.10); color:var(--ui-text); }
.btn:focus-visible,.nav-link:focus-visible,.theme-toggle:focus-visible { outline:3px solid var(--ocean-focus); outline-offset:2px; }
.credits-badge { background:var(--ocean-mist); color:var(--ocean-ink); }
.account-avatar-btn { border-color:rgba(105,210,231,.42); background:var(--brand-600); box-shadow:0 4px 12px rgba(3,32,47,.22); }

/* Product surfaces */
.wrt-page,.lib-page,.rewrite-page,.doc-rewrite-page,.orders-page,.account-page {
  background:var(--ui-page) !important;
  color:var(--ui-text);
}
.wrt-bg,.lib-bg,.doc-rewrite-bg,.orders-bg {
  background:
    radial-gradient(circle at 12% 4%,rgba(105,210,231,.11),transparent 34%),
    radial-gradient(circle at 88% 28%,rgba(167,219,216,.08),transparent 30%),
    linear-gradient(180deg,var(--ui-page),var(--ui-page)) !important;
}
body.light-theme .wrt-bg,body.light-theme .lib-bg,body.light-theme .doc-rewrite-bg {
  opacity:1;
  background:
    radial-gradient(circle at 12% 4%,rgba(105,210,231,.16),transparent 34%),
    radial-gradient(circle at 88% 24%,rgba(224,228,204,.48),transparent 30%),
    linear-gradient(180deg,#fafcf7,var(--ui-page)) !important;
}
.wrt-orb,.lib-orb,.orders-orb { opacity:.24; filter:blur(90px) saturate(.75); }
.wrt-title,.lib-header-title,.rewrite-page-title,.orders-title,.account-header h1 { color:var(--ui-text) !important; background:none !important; -webkit-text-fill-color:currentColor !important; }
.wrt-subtitle,.lib-header-sub,.rewrite-page-subtitle,.orders-subtitle,.account-header p { color:var(--ui-text-muted) !important; }
.wrt-header-kicker,.lib-hbadge,.doc-rewrite-eyebrow,.orders-eyebrow,.account-kicker { color:var(--ocean-cyan) !important; }
body.light-theme :is(.wrt-header-kicker,.lib-hbadge,.doc-rewrite-eyebrow,.orders-eyebrow,.account-kicker) { color:var(--brand-700) !important; }

:is(.wrt-form-shell,.wrt-checkout,.wrt-card,.social-workbench-head,.social-input-panel,.social-output-panel,.rewrite-editor-card,.rewrite-cost-panel,.doc-rewrite-card,.lib-toolbar-card,.lib-group,.lib-card,.order-card,.pkgcard,.account-overview,.account-panel,.account-action,.account-guest) {
  border-color:var(--ui-border) !important;
  background:var(--ui-surface) !important;
  box-shadow:var(--ui-shadow) !important;
}
:is(.wrt-form-shell,.wrt-checkout,.wrt-card,.social-workbench-head,.social-input-panel,.social-output-panel,.rewrite-editor-card,.doc-rewrite-card,.lib-toolbar-card,.lib-group,.lib-card,.order-card,.pkgcard,.account-overview,.account-panel,.account-action) { backdrop-filter:none; }
.rewrite-result-card,#rewriteContent { background:var(--ui-surface-soft) !important; border-color:var(--ocean-line-strong) !important; }
:is(.wrt-form-section + .wrt-form-section,.wrt-advanced,.wrt-checkout-footer,.doc-rewrite-card-title,.lib-group-header,.account-service-panel > button,.account-security-row) { border-color:var(--ui-border) !important; }

:is(.wrt-input,.wrt-field-display,.wrt-field-search,.social-requirements,.lib-search,.profile-input,#originalText,.auth-input-wrap,input,textarea,select) {
  border-color:var(--ui-border) !important;
  background:var(--ui-surface-soft) !important;
  color:var(--ui-text) !important;
}
:is(.wrt-input,.wrt-field-display,.wrt-field-search,.social-requirements,.lib-search,.profile-input,#originalText,input,textarea,select):focus,
.wrt-field-display:focus-within {
  border-color:var(--ocean-cyan) !important;
  box-shadow:0 0 0 3px var(--ocean-focus) !important;
}
:is(input,textarea,.wrt-input,.wrt-field-search,.social-requirements,.lib-search)::placeholder { color:var(--ui-text-muted) !important; opacity:.78; }
.wrt-field-panel { border-color:var(--ui-border); background:var(--ui-surface); box-shadow:var(--ui-shadow); }
.wrt-field-item { color:var(--ui-text-secondary); }
.wrt-field-item:hover,.wrt-field-item.active { background:rgba(105,210,231,.12); color:var(--ui-text); }
.wrt-field-item mark { background:rgba(105,210,231,.22); color:var(--ui-text); }

/* One interaction language across workspaces */
.wrt-workspace-switch,#rewriteVersionTabs,.orders-tabs {
  border-color:var(--ui-border) !important;
  background:var(--ui-surface-soft) !important;
  box-shadow:none !important;
}
.wrt-workspace-tab,.otab,#rewriteVersionTabs button { color:var(--ui-text-muted) !important; }
.wrt-workspace-tab.is-active,.otab.on,#rewriteVersionTabs button.is-active {
  border-color:var(--ocean-cyan) !important;
  background:var(--ocean-mint) !important;
  color:var(--ocean-ink) !important;
  box-shadow:none !important;
}
.wrt-workspace-tab.is-active .wrt-workspace-icon { background:rgba(17,43,70,.09); color:var(--ocean-ink); }
.wrt-workspace-icon,.social-platform span,.wrt-step-index,.wrt-checkout-item-icon { background:rgba(105,210,231,.12); color:var(--ocean-cyan); border-color:rgba(105,210,231,.20); }
body.light-theme :is(.wrt-workspace-icon,.social-platform span,.wrt-step-index,.wrt-checkout-item-icon) { background:#dff3ef; color:#226573; }

.wrt-type-card,.social-platform,.social-goal,.lib-filter {
  border-color:var(--ui-border) !important;
  background:var(--ui-surface-soft) !important;
  color:var(--ui-text-secondary) !important;
  box-shadow:none !important;
}
:is(.wrt-type-card,.social-platform,.social-goal,.lib-filter):hover { border-color:var(--ocean-cyan) !important; background:rgba(105,210,231,.08) !important; color:var(--ui-text) !important; }
.wrt-type-card.selected,.social-platform.is-active,.social-goal.is-active,.lib-filter.active {
  border-color:var(--ocean-cyan) !important;
  background:rgba(105,210,231,.14) !important;
  color:var(--ui-text) !important;
  box-shadow:inset 0 0 0 1px rgba(105,210,231,.18) !important;
}
body.light-theme :is(.wrt-type-card.selected,.social-platform.is-active,.social-goal.is-active,.lib-filter.active) {
  background:#e2f4f0 !important;
  color:var(--ocean-ink) !important;
}
.wrt-type-card.selected .wrt-type-chk { background:var(--ocean-cyan) !important; color:var(--ocean-ink) !important; }
.wrt-type-card.selected .wrt-type-name,.wrt-type-card.selected .wrt-type-cost { color:inherit !important; }
.wrt-summary { border-color:var(--ui-border); background:var(--ui-surface-soft); color:var(--ui-text-muted); }
.wrt-summary-icon { background:var(--ocean-cyan); color:var(--ocean-ink); }
.wrt-summary-types { color:var(--ui-text); }
.wrt-summary-cost,.wrt-checkout-cost strong,.account-price-grid b,.account-rewrite-price b { color:var(--ocean-orange); }
.wrt-checkout-list > div { border-color:var(--ui-border); background:var(--ui-surface-soft); }
.wrt-checkout-list > div.is-complete { border-color:rgba(105,210,231,.34); background:rgba(105,210,231,.09); }
.wrt-checkout-item-check { color:var(--ocean-cyan); }

.wrt-gen-btn,.social-generate-btn,.lib-new-btn,.lib-btn-export,.lib-btn-primary,.orders-primary-btn,.pkg-buy-btn.primary,.account-action-primary,.account-primary-btn,.profile-submit-btn,.doc-rewrite-start,#rewriteBtn {
  border:1px solid #50bdd2 !important;
  background:var(--ocean-cyan) !important;
  color:var(--ocean-ink) !important;
  box-shadow:0 9px 22px rgba(31,111,126,.20) !important;
}
:is(.wrt-gen-btn,.social-generate-btn,.lib-new-btn,.lib-btn-export,.lib-btn-primary,.orders-primary-btn,.pkg-buy-btn.primary,.account-action-primary,.account-primary-btn,.profile-submit-btn,.doc-rewrite-start,#rewriteBtn):hover:not(:disabled) {
  border-color:#45afc4 !important;
  background:#5bc7dc !important;
  color:var(--ocean-ink) !important;
  box-shadow:0 12px 26px rgba(31,111,126,.24) !important;
}
.wrt-gen-btn::after { display:none; }
.wrt-gen-btn.insufficient { border-color:var(--ocean-orange) !important; background:var(--ocean-orange) !important; color:var(--ocean-ink) !important; }
.doc-rewrite-entry-btn,.wrt-gen-title-btn,.social-copy-btn,.lib-btn-view,.account-support-btn,.account-text-btn {
  border-color:var(--ui-border) !important;
  background:var(--ui-surface-soft) !important;
  color:var(--ui-text-secondary) !important;
  box-shadow:none !important;
}
:is(.doc-rewrite-entry-btn,.wrt-gen-title-btn,.social-copy-btn,.lib-btn-view,.account-support-btn):hover { border-color:var(--ocean-cyan) !important; background:rgba(105,210,231,.10) !important; color:var(--ui-text) !important; }
#estimatedCredits { color:var(--ocean-orange) !important; }

/* Library, orders and account pages render part of their CSS inline. */
.lib-page { background:var(--ui-page) !important; }
.lib-bg { opacity:1 !important; }
.lib-search-icon,.lib-loading,.lib-empty,.lib-group-date,.lib-card-meta span { color:var(--ui-text-muted) !important; }
.lib-group-topic,.lib-card-title,.lib-card-preview,.lib-viewer-title,.lib-viewer-content { color:var(--ui-text) !important; }
.lib-group-label { border-color:rgba(105,210,231,.24) !important; background:rgba(105,210,231,.10) !important; color:var(--ocean-cyan) !important; }
body.light-theme .lib-group-label { color:var(--brand-700) !important; }
.lib-card-icon-wrap { border-color:rgba(105,210,231,.20) !important; background:rgba(105,210,231,.10) !important; }
.lib-viewer { border-color:var(--ui-border) !important; background:var(--ui-surface) !important; box-shadow:0 24px 70px rgba(3,23,37,.42) !important; }
.lib-viewer-head,.lib-viewer-toolbar,.lib-viewer-footer { border-color:var(--ui-border) !important; }

.orders-page { background:var(--ui-page) !important; }
.orders-eyebrow { border-color:rgba(105,210,231,.24) !important; background:rgba(105,210,231,.10) !important; }
.orders-credits,.account-balance { border-color:rgba(243,134,48,.28) !important; background:rgba(243,134,48,.10) !important; color:var(--ocean-orange) !important; }
.orders-credits-label,.account-balance > span { color:color-mix(in srgb,var(--ocean-orange) 72%,var(--ui-text)) !important; }
.order-card-title,.pkg-name,.pkg-price.paid,.orders-info-title { color:var(--ui-text) !important; }
.order-card-meta,.order-points-label,.pkg-credits-label,.pkg-desc,.orders-state,.orders-empty-text,.orders-recharge-intro,.orders-info-grid { color:var(--ui-text-muted) !important; }
.pkg-credits-num,.order-points-value:not(.is-positive),.orders-info-accent { color:var(--ocean-cyan) !important; }
.pkgcard.popular { border-color:rgba(105,210,231,.42) !important; background:var(--ui-surface) !important; }
.pkg-tag.hot { background:var(--ocean-cyan) !important; color:var(--ocean-ink) !important; }

.account-page {
  --account-bg:var(--ui-page);
  --account-surface:var(--ui-surface);
  --account-surface-soft:var(--ui-surface-soft);
  --account-border:var(--ui-border);
  --account-border-strong:var(--ocean-line-strong);
  --account-text:var(--ui-text);
  --account-muted:var(--ui-text-muted);
  --account-subtle:var(--ui-text-muted);
  --account-accent:var(--ocean-cyan);
  --account-accent-strong:var(--brand-600);
  --account-accent-soft:rgba(105,210,231,.11);
  --account-success:var(--ocean-mint);
  --account-success-soft:rgba(167,219,216,.10);
  --account-amber:var(--ocean-orange);
  --account-amber-soft:rgba(243,134,48,.10);
  background:var(--ui-page) !important;
}
.account-avatar { background:var(--brand-600); box-shadow:0 6px 16px rgba(3,32,47,.22); }
.account-action-icon,.account-price-icon,.account-guest-icon { background:rgba(105,210,231,.11); color:var(--ocean-cyan); }
body.light-theme :is(.account-action-icon,.account-price-icon,.account-guest-icon) { color:var(--brand-700); }
.account-action-primary .account-action-icon { background:rgba(17,43,70,.10); color:var(--ocean-ink); }
.account-rewrite-price { border-color:rgba(105,210,231,.24); background:rgba(105,210,231,.09); color:var(--ui-text-secondary); }
.account-code-row,.account-bind-row .profile-input { border-color:var(--ui-border) !important; background:var(--ui-surface-soft) !important; }
.account-code-row code { color:var(--ocean-cyan); }
.account-code-row button { border-left-color:var(--ui-border); background:rgba(105,210,231,.10); color:var(--ocean-cyan); }
.account-avatar-btn:hover,.account-avatar-btn[aria-expanded="true"] { border-color:var(--ocean-cyan); background:#3c93a2; box-shadow:0 6px 16px rgba(3,32,47,.28); }
.account-menu-code { border-color:var(--ui-border); background:var(--ui-surface-soft); }
.account-menu-code code { color:var(--ocean-cyan); }
.account-menu-code button { border-left-color:var(--ui-border); background:rgba(105,210,231,.10); color:var(--ocean-cyan); }
.account-menu-code button:hover { background:rgba(105,210,231,.18); color:var(--ui-text); }
.account-action:hover .account-action-arrow,.account-service-panel > button span i { color:var(--ocean-cyan); }
.account-bind-row .profile-input:focus { border-color:var(--ocean-cyan) !important; box-shadow:0 0 0 3px var(--ocean-focus); }

.landing-kicker,.landing-section-head > span,.landing-final-cta > div > span { color:var(--ocean-cyan); }
body.light-theme :is(.landing-kicker,.landing-section-head > span,.landing-final-cta > div > span) { color:var(--brand-700); }
.landing-capability-icon,.landing-document-head > span { background:rgba(105,210,231,.12); color:var(--ocean-cyan); }
body.light-theme :is(.landing-capability-icon,.landing-document-head > span) { background:#dff3ef; color:var(--brand-700); }
.landing-document-card > button { border-color:var(--ui-border); background:var(--ui-surface-soft); color:var(--ui-text-secondary); }
.landing-document-card > button:hover { border-color:var(--ocean-cyan); background:rgba(105,210,231,.10); color:var(--ui-text); }
.landing-secondary:hover { border-color:var(--ocean-cyan); background:rgba(105,210,231,.10); color:var(--ui-text); }

.social-eyebrow,.social-preview-platform,.social-preview-tags { color:var(--ocean-cyan); }
.social-empty-icon { background:rgba(105,210,231,.12); color:var(--ocean-cyan); }
.social-hero-orb { background:linear-gradient(135deg,var(--ocean-cyan),var(--ocean-mint)); color:var(--ocean-ink); box-shadow:0 18px 44px rgba(31,111,126,.22); }
.social-stepper span.is-active { background:rgba(105,210,231,.14); color:var(--ui-text); }
.social-comment { background:rgba(105,210,231,.09); color:var(--ui-text-muted); }

.doc-rewrite-step,.doc-rewrite-result-index { background:var(--ocean-cyan); color:var(--ocean-ink); }
.doc-rewrite-upload-icon { background:rgba(105,210,231,.14); color:var(--ocean-cyan); }
body.light-theme .doc-rewrite-upload-icon { background:#dff3ef; color:var(--brand-700); }
.doc-rewrite-dropzone:hover,.doc-rewrite-dropzone:focus-visible,.doc-rewrite-dropzone.is-dragover { border-color:var(--ocean-cyan); background:rgba(105,210,231,.10); }
.doc-rewrite-percent,.doc-rewrite-result-label,.doc-rewrite-result-arrow,.doc-rewrite-note i { color:var(--ocean-cyan); }
.doc-rewrite-progress-bar { background:linear-gradient(90deg,var(--ocean-cyan),var(--ocean-mint)); }

.lib-btn-expand:hover { border-color:var(--ocean-cyan) !important; color:var(--ocean-cyan) !important; }
.lib-hbadge-dot,.orders-eyebrow span { background:var(--ocean-cyan) !important; box-shadow:none !important; }
.rewrite-copy-btn { border-color:var(--ui-border) !important; background:var(--ui-surface-soft) !important; color:var(--ui-text-secondary) !important; }
.rewrite-copy-btn:hover:not(:disabled) { border-color:var(--ocean-cyan) !important; background:rgba(105,210,231,.10) !important; color:var(--ui-text) !important; }
#progressText { color:var(--brand-600) !important; }
.rewrite-editor-card > div:first-child > div:first-child > span:first-child { background:var(--ocean-cyan) !important; color:var(--ocean-ink) !important; }

/* Authentication v6: pure artwork, one alignment grid, quieter input surfaces. */
.auth-modal {
  padding:clamp(14px,3vw,36px);
  background:rgba(7,31,44,.56);
  backdrop-filter:blur(16px) saturate(108%);
}
.auth-modal .auth-shell {
  display:grid;
  grid-template-columns:minmax(340px,.92fr) minmax(420px,1.08fr);
  width:min(940px,calc(100vw - 40px));
  max-width:940px;
  min-height:600px;
  max-height:min(650px,calc(100dvh - 32px));
  overflow:hidden;
  border:1px solid var(--ui-border);
  border-radius:20px;
  background:var(--ui-surface);
  box-shadow:0 36px 96px rgba(3,23,37,.28),inset 0 1px 0 rgba(255,255,255,.60);
}
.auth-brand-panel {
  position:relative;
  min-height:600px;
  padding:0;
  overflow:hidden;
  border-radius:19px 0 0 19px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.10),transparent 28%),
    url("../assets/auth-anime-breeze-v6.webp") 52% center/cover no-repeat,
    #a7dbd8;
  filter:none;
  isolation:isolate;
}
.auth-brand-panel::before {
  display:block;
  background:
    linear-gradient(90deg,rgba(105,210,231,.08),transparent 36%),
    linear-gradient(0deg,rgba(224,228,204,.10),transparent 28%);
  opacity:1;
}
.auth-brand-panel::after,
.auth-brand-lockup,
.auth-brand-copy,
.auth-brand-features,
.auth-brand-kicker { display:none !important; }
.auth-brand-logo {
  position:absolute;
  z-index:2;
  top:24px;
  left:24px;
  width:50px;
  height:50px;
  border-radius:14px;
  object-fit:cover;
  box-shadow:0 10px 26px rgba(17,43,70,.16);
}
.auth-container {
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  overflow:auto;
  padding:32px 46px 30px;
  background:var(--ui-surface);
  color:var(--ui-text);
  scrollbar-gutter:stable;
}
.auth-container .auth-tabs,
.auth-container .auth-form {
  width:100%;
  max-width:360px;
  margin-left:auto;
  margin-right:auto;
}
.auth-container .auth-tabs {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px;
  margin-top:0;
  margin-bottom:26px;
  padding:4px;
  border:1px solid var(--ui-border);
  border-radius:12px;
  background:var(--ui-surface-soft);
  box-shadow:none;
}
.auth-container .auth-tab {
  min-height:38px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:8px;
  color:var(--ui-text-muted);
  font-size:12px;
  font-weight:720;
  letter-spacing:0;
  text-align:center;
}
.auth-container .auth-tab span { display:none; }
.auth-container .auth-tab.active {
  border-color:rgba(105,210,231,.46);
  background:#dff3ef;
  color:#15384b;
  box-shadow:0 2px 8px rgba(31,111,126,.10);
}
.auth-container .auth-tab.active::after { display:none; }
.auth-form[aria-hidden="true"] { display:none; }
.auth-form-head { margin:0 0 18px; }
.auth-container .auth-form h2 {
  color:var(--ui-text);
  font-size:25px;
  font-weight:800;
  letter-spacing:-.035em;
  line-height:1.25;
}
.auth-form-head p {
  margin-top:6px;
  color:var(--ui-text-muted);
  font-size:12px;
  line-height:1.5;
}
.auth-mode-tabs {
  justify-content:flex-start;
  gap:25px;
  width:100%;
  margin:0 0 20px;
  padding:0;
  border:0;
  border-bottom:1px solid var(--ui-border);
  border-radius:0;
  background:transparent;
}
.auth-mode-tab {
  position:relative;
  flex:0 0 auto;
  min-height:36px;
  padding:0 0 11px;
  border-radius:0;
  color:var(--ui-text-muted);
  font-size:11px;
  font-weight:700;
}
.auth-mode-tab::after {
  content:"";
  position:absolute;
  right:0;
  bottom:-1px;
  left:0;
  height:2px;
  border-radius:2px;
  background:transparent;
}
.auth-mode-tab.is-active {
  background:transparent;
  color:var(--ui-text);
  box-shadow:none;
}
.auth-mode-tab.is-active::after { background:var(--ocean-cyan); }
.auth-container .form-group {
  position:relative;
  width:100%;
  margin:0 0 14px;
}
.auth-container .form-group > label {
  display:block;
  margin:0 0 7px;
  color:var(--ui-text-secondary);
  font-size:11px;
  font-weight:700;
  line-height:1.35;
}
.auth-input-wrap {
  min-height:46px;
  padding:0 13px;
  border:1px solid #cadbd5;
  border-radius:11px;
  background:#fbfdf9 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86);
  transition:border-color 150ms ease,box-shadow 150ms ease,background-color 150ms ease;
}
.auth-input-wrap:hover {
  border-color:#9dc6c2;
  background:#fff !important;
}
.auth-input-wrap:focus-within {
  border-color:#4ebed4 !important;
  background:#fff !important;
  box-shadow:0 0 0 3px rgba(105,210,231,.19) !important;
}
.auth-input-wrap > i { width:21px; color:#607b82; font-size:11px; }
.auth-input-wrap > span {
  padding-right:11px;
  border-right-color:#d6e2dd;
  color:#395966;
  font-size:11px;
}
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input {
  height:44px;
  padding-left:9px;
  background:transparent !important;
  color:#112b46 !important;
  caret-color:#247e90;
  font-size:12px;
}
.auth-container .auth-input-wrap input::placeholder { color:#657b82 !important; opacity:1; }
.auth-password-wrap input { padding-right:4px !important; }
.auth-password-toggle {
  flex:0 0 34px;
  width:34px;
  height:34px;
  margin-right:-7px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#607b82;
}
.auth-password-toggle:hover { background:#edf7f3; color:#234c5b; }
.auth-code-group { width:100%; gap:9px; }
.auth-code-group .btn {
  flex-basis:108px;
  min-height:46px;
  border-color:#b9d4d0;
  border-radius:11px;
  background:#edf7f3;
  color:#285965;
  font-size:10px;
  box-shadow:none;
}
.auth-code-group .btn:hover:not(:disabled) { border-color:#69d2e7; background:#dff3ef; color:#173d4b; }
.auth-field-message,
.auth-form-message {
  min-height:0;
  margin:5px 2px 0;
  color:#a84413;
  font-size:9px;
  font-weight:650;
  line-height:1.4;
}
.auth-field-message:empty,
.auth-form-message:empty { display:none; }
.auth-field-message.auth-field-hint { display:block; color:var(--ui-text-muted); font-weight:500; }
.auth-form-message { margin:0 2px 9px; text-align:left; }
.auth-container .form-group.has-error .auth-input-wrap {
  border-color:#e47432;
  background:#fffaf7 !important;
  box-shadow:0 0 0 3px rgba(243,134,48,.12) !important;
}
.auth-container .form-group.has-error > label { color:#9c4218; }
.auth-container .auth-submit {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  margin-top:2px;
  border:1px solid #4ebed4;
  border-radius:11px;
  background:#69d2e7;
  color:#112b46;
  font-size:12px;
  font-weight:760;
  box-shadow:0 9px 22px rgba(31,111,126,.18);
}
.auth-container .auth-submit:hover:not(:disabled) {
  transform:translateY(-1px);
  border-color:#42aec3;
  background:#5bc7dc;
  box-shadow:0 12px 25px rgba(31,111,126,.22);
}
.auth-container .auth-submit:active { transform:translateY(1px); }
.auth-legal {
  margin:10px 0 0;
  color:var(--ui-text-muted);
  font-size:9px;
  line-height:1.55;
  text-align:center;
}
.auth-legal a,.auth-agree-label a { color:#236b78; text-underline-offset:2px; }
.auth-agree { margin-top:0 !important; }
.auth-agree-label { align-items:flex-start; color:var(--ui-text-muted); font-size:9px; line-height:1.55; }
.auth-agree-label input[type="checkbox"] { width:15px; height:15px; margin-top:0; accent-color:#42b4ca; }
.auth-register-passwords { gap:10px; }
.auth-modal .modal-close {
  top:16px;
  right:16px;
  border-color:var(--ui-border);
  background:rgba(255,255,255,.84);
  color:#244b5c;
  box-shadow:0 7px 18px rgba(17,43,70,.10);
  backdrop-filter:blur(10px);
}
.auth-modal .modal-close:hover { border-color:#69d2e7; background:#dff3ef; color:#112b46; }

body:not(.light-theme) .auth-modal { background:rgba(2,18,29,.72); }
body:not(.light-theme) .auth-modal .auth-shell { border-color:rgba(105,210,231,.24); }
body:not(.light-theme) .auth-container { background:#102d42 !important; }
body:not(.light-theme) .auth-container .auth-tabs { border-color:#416477; background:#18384d; }
body:not(.light-theme) .auth-container .auth-tab { color:#b8cbd0; }
body:not(.light-theme) .auth-container .auth-tab.active { border-color:rgba(105,210,231,.56); background:#a7dbd8; color:#112b46; }
body:not(.light-theme) .auth-mode-tabs { border-bottom-color:#466879; background:transparent; }
body:not(.light-theme) .auth-mode-tab { color:#b7cbd0; }
body:not(.light-theme) .auth-mode-tab.is-active { background:transparent; color:#f1f6ed; }
body:not(.light-theme) .auth-input-wrap {
  border-color:#557c8c;
  background:#21495b !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
body:not(.light-theme) .auth-input-wrap:hover { border-color:#70a0ad; background:#254f61 !important; }
body:not(.light-theme) .auth-input-wrap:focus-within { border-color:#69d2e7 !important; background:#254f61 !important; }
body:not(.light-theme) .auth-container .auth-input-wrap input { color:#f1f6ed !important; caret-color:#8ee3f3; }
body:not(.light-theme) .auth-container .auth-input-wrap input::placeholder { color:#bdd0d4 !important; }
body:not(.light-theme) .auth-input-wrap > i,
body:not(.light-theme) .auth-input-wrap > span,
body:not(.light-theme) .auth-password-toggle { color:#c1d3d4; }
body:not(.light-theme) .auth-input-wrap > span { border-right-color:#628494; }
body:not(.light-theme) .auth-password-toggle:hover { background:#31586a; color:#f1f6ed; }
body:not(.light-theme) .auth-code-group .btn { border-color:#557c8c; background:#21495b; color:#e0ece8; }
body:not(.light-theme) .auth-code-group .btn:hover:not(:disabled) { border-color:#69d2e7; background:#2a5668; color:#fff; }
body:not(.light-theme) .auth-input-wrap input:-webkit-autofill {
  -webkit-text-fill-color:#f1f6ed;
  box-shadow:0 0 0 1000px #21495b inset !important;
}
body:not(.light-theme) .auth-container .form-group.has-error .auth-input-wrap { border-color:#ff9d70; background:#3a4650 !important; }
body:not(.light-theme) .auth-field-message,
body:not(.light-theme) .auth-form-message { color:#ffb38c; }
body:not(.light-theme) .auth-legal a,
body:not(.light-theme) .auth-agree-label a { color:#8edce9; }
body:not(.light-theme) .auth-modal .modal-close { border-color:#557c8c; background:rgba(27,64,84,.90); color:#edf5ea; }
body.light-theme .auth-container,
body.light-theme .auth-modal .auth-shell { background:#fff; }

@media (max-width:900px) {
  .auth-modal .auth-shell {
    grid-template-columns:minmax(300px,.80fr) minmax(400px,1.20fr);
    width:min(850px,calc(100vw - 28px));
  }
  .auth-container { padding:30px 34px 28px; }
}
@media (max-width:760px) {
  .auth-modal { padding:10px; }
  .auth-modal .auth-shell {
    display:flex;
    flex-direction:column;
    width:min(100%,500px);
    min-height:0;
    max-height:calc(100dvh - 20px);
    overflow:auto;
    border-radius:17px;
  }
  .auth-brand-panel {
    flex:0 0 168px;
    min-height:168px;
    border-radius:16px 16px 0 0;
    background-position:center 45%;
  }
  .auth-container { flex:0 0 auto; overflow:visible; padding:24px 24px 26px; }
  .auth-container .auth-tabs { margin-bottom:22px; }
}
@media (max-width:460px) {
  .auth-brand-panel { flex-basis:142px; min-height:142px; background-position:center 43%; }
  .auth-container { padding:22px 17px 24px; }
  .auth-code-group { grid-template-columns:minmax(0,1fr) 104px; }
  .auth-register-passwords { grid-template-columns:1fr; gap:0; }
}

/* Authentication: less copy, calmer artwork, clearer two-level navigation. */
.auth-modal {
  padding:clamp(16px,3vw,40px);
  background:rgba(4,30,44,.58);
  backdrop-filter:blur(14px) saturate(105%);
}
.auth-modal .auth-shell {
  grid-template-columns:minmax(0,.96fr) minmax(408px,1.04fr);
  width:min(960px,calc(100vw - 48px));
  max-width:960px;
  max-height:min(660px,calc(100dvh - 40px));
  border:1px solid var(--ui-border);
  border-radius:18px;
  background:var(--ui-surface);
  box-shadow:0 34px 90px rgba(3,23,37,.30),0 0 0 1px rgba(255,255,255,.45) inset;
}
.auth-brand-panel {
  min-height:604px;
  padding:28px 30px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.30) 0%,transparent 28%),
    linear-gradient(0deg,rgba(224,228,204,.66) 0%,rgba(224,228,204,.12) 38%,transparent 58%),
    linear-gradient(90deg,rgba(105,210,231,.22),transparent 58%),
    url("../assets/auth-anime-study-v5.webp") 54% center/cover no-repeat,
    var(--ocean-mint);
}
.auth-brand-panel::before {
  background:linear-gradient(90deg,rgba(255,255,255,.20),transparent 48%);
}
.auth-brand-panel::after,.auth-brand-features,.auth-brand-kicker { display:none; }
.auth-brand-lockup { gap:10px; }
.auth-brand-lockup img { width:38px; height:38px; border-radius:11px; box-shadow:0 8px 22px rgba(17,43,70,.14); }
.auth-brand-lockup strong { color:var(--ocean-ink); font-size:16px; }
.auth-brand-lockup span { color:#486879; font-size:9px; }
.auth-brand-copy { left:30px; right:30px; bottom:30px; }
.auth-brand-copy h2 {
  max-width:270px;
  color:var(--ocean-ink);
  font-size:30px;
  font-weight:850;
  letter-spacing:-.045em;
  line-height:1.18;
  text-shadow:0 1px 0 rgba(255,255,255,.82),0 8px 22px rgba(255,255,255,.42);
}
.auth-brand-copy p { display:none; }
.auth-container {
  display:flex;
  flex-direction:column;
  padding:28px 38px 30px;
  background:var(--ui-surface);
  color:var(--ui-text);
}
.auth-container .auth-tabs,.auth-container .auth-form { max-width:360px; }
.auth-container .auth-tabs {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px;
  margin:0 auto 27px;
  padding:4px;
  border:1px solid var(--ui-border);
  border-radius:13px;
  background:var(--ui-surface-soft);
  box-shadow:none;
}
.auth-container .auth-tab {
  min-height:38px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:9px;
  color:var(--ui-text-muted);
  font-size:12px;
  font-weight:750;
  text-align:center;
}
.auth-container .auth-tab.active {
  border-color:rgba(105,210,231,.42);
  background:var(--ocean-mint);
  color:var(--ocean-ink);
  box-shadow:0 2px 7px rgba(31,111,126,.10);
}
.auth-container .auth-tab.active::after { display:none; }
.auth-form-head { margin:0 0 20px; }
.auth-container .auth-form h2 { color:var(--ui-text); font-size:24px; letter-spacing:-.035em; }
.auth-form-head p { margin-top:5px; color:var(--ui-text-muted); font-size:11px; }
.auth-mode-tabs {
  justify-content:flex-start;
  gap:24px;
  margin:0 0 18px;
  padding:0;
  border:0;
  border-bottom:1px solid var(--ui-border);
  border-radius:0;
  background:transparent;
}
.auth-mode-tab {
  position:relative;
  flex:0 0 auto;
  min-height:36px;
  padding:0 1px 10px;
  border-radius:0;
  color:var(--ui-text-muted);
  font-size:11px;
  font-weight:700;
}
.auth-mode-tab::after {
  content:"";
  position:absolute;
  right:0;
  bottom:-1px;
  left:0;
  height:2px;
  border-radius:2px;
  background:transparent;
}
.auth-mode-tab.is-active { background:transparent; color:var(--ui-text); box-shadow:none; }
.auth-mode-tab.is-active::after { background:var(--ocean-cyan); }
.auth-container .form-group { margin-bottom:6px; }
.auth-container .form-group > label { margin-bottom:6px; color:var(--ui-text-secondary); font-size:11px; }
.auth-input-wrap {
  min-height:45px;
  padding:0 12px;
  border:1px solid var(--ui-border);
  border-radius:11px;
  background:var(--ui-surface-soft) !important;
  box-shadow:none;
}
.auth-input-wrap:hover { border-color:var(--ocean-line-strong); }
.auth-input-wrap:focus-within { border-color:var(--ocean-cyan) !important; box-shadow:0 0 0 3px var(--ocean-focus) !important; }
.auth-container .auth-input-wrap input { height:43px; background:transparent !important; color:var(--ui-text) !important; font-size:12px; }
.auth-input-wrap > i,.auth-input-wrap > span,.auth-password-toggle { color:var(--ui-text-muted); }
.auth-password-toggle:hover { background:rgba(105,210,231,.10); color:var(--ui-text); }
.auth-code-group .btn { flex-basis:105px; min-height:45px; border-radius:11px; font-size:10px; }
.auth-code-group .btn.is-loading { cursor:wait; }
.auth-field-message,.auth-form-message { color:#c45522; }
.auth-field-message.auth-field-hint { color:var(--ui-text-muted); }
.auth-container .form-group.has-error .auth-input-wrap { border-color:var(--ocean-orange); background:rgba(243,134,48,.06) !important; box-shadow:0 0 0 3px rgba(243,134,48,.13) !important; }
.auth-container .form-group.has-error > label { color:#b44f1d; }
.auth-container .auth-submit {
  order:initial;
  min-height:46px;
  border:1px solid #50bdd2;
  border-radius:11px;
  background:var(--ocean-cyan);
  color:var(--ocean-ink);
  box-shadow:0 9px 22px rgba(31,111,126,.20);
}
.auth-container .auth-submit:hover { background:#5bc7dc; box-shadow:0 12px 26px rgba(31,111,126,.24); }
.auth-container .auth-submit.is-loading::before { border-color:rgba(17,43,70,.25); border-top-color:var(--ocean-ink); }
.auth-legal { margin:10px 0 0; color:var(--ui-text-muted); font-size:9px; text-align:center; }
.auth-legal a,.auth-agree-label a { color:#a84413; }
.auth-agree-label { color:var(--ui-text-muted); }
.auth-agree-label input[type="checkbox"] { accent-color:var(--brand-600); }
.auth-modal .modal-close { border-color:var(--ui-border); background:color-mix(in srgb,var(--ui-surface) 88%,transparent); color:var(--ui-text); }
.auth-modal .modal-close:hover { border-color:var(--ocean-cyan); background:var(--ocean-mint); color:var(--ocean-ink); }

body:not(.light-theme) .auth-modal { background:rgba(2,19,31,.74); }
body:not(.light-theme) .auth-modal .auth-shell { border-color:rgba(105,210,231,.26); background:var(--ui-surface); }
body:not(.light-theme) .auth-container,body:not(.light-theme) .auth-input-wrap { background:var(--ui-surface) !important; }
body:not(.light-theme) .auth-container .auth-tabs,body:not(.light-theme) .auth-input-wrap { border-color:var(--ui-border); }
body:not(.light-theme) .auth-container .auth-tab.active { background:var(--ocean-mint); color:var(--ocean-ink); }
body:not(.light-theme) .auth-mode-tab.is-active { color:#f1f6ed; background:transparent; }
body:not(.light-theme) .auth-field-message,body:not(.light-theme) .auth-form-message { color:#ffb38c; }
body:not(.light-theme) .auth-legal a,body:not(.light-theme) .auth-agree-label a { color:#ffb079; }
body:not(.light-theme) .auth-container .form-group.has-error > label { color:#ffb38c; }
body:not(.light-theme) .auth-input-wrap input:-webkit-autofill { -webkit-text-fill-color:#f1f6ed; box-shadow:0 0 0 1000px var(--ui-surface-soft) inset !important; }
body.light-theme .auth-container,body.light-theme .auth-modal .auth-shell { background:#fff; }
body.light-theme .auth-input-wrap { background:#f7faf5 !important; }

@media (max-width:900px) {
  .auth-modal .auth-shell { grid-template-columns:minmax(300px,.82fr) minmax(390px,1.18fr); width:min(830px,calc(100vw - 30px)); }
  .auth-container { padding:28px 30px; }
}
@media (max-width:760px) {
  .auth-modal .auth-shell { display:flex; width:min(100%,500px); max-height:none; }
  .auth-brand-panel { min-height:170px; padding:19px 20px; background-position:center 43%; }
  .auth-brand-copy { left:20px; right:66px; bottom:19px; }
  .auth-brand-copy h2 { max-width:230px; font-size:21px; }
  .auth-container { padding:23px 22px 25px; }
  .auth-container .auth-tabs { margin-bottom:22px; }
}
@media (max-width:460px) {
  .auth-brand-panel { min-height:148px; }
  .auth-brand-copy h2 { font-size:19px; }
  .auth-container { padding:21px 17px 23px; }
}

/* Authentication v6 final cascade. Keep this after the legacy auth skins. */
.auth-modal {
  padding:clamp(14px,3vw,36px);
  background:rgba(7,31,44,.56);
  backdrop-filter:blur(16px) saturate(108%);
}
.auth-modal .auth-shell {
  display:grid;
  grid-template-columns:minmax(340px,.92fr) minmax(420px,1.08fr);
  width:min(940px,calc(100vw - 40px));
  max-width:940px;
  min-height:600px;
  max-height:min(650px,calc(100dvh - 32px));
  overflow:hidden;
  border-radius:20px;
}
.auth-brand-panel {
  min-height:600px;
  padding:0;
  overflow:hidden;
  border-radius:19px 0 0 19px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.10),transparent 28%),
    url("../assets/auth-anime-breeze-v6.webp") 52% center/cover no-repeat,
    #a7dbd8;
  filter:none;
}
.auth-brand-panel::before {
  display:block;
  background:
    linear-gradient(90deg,rgba(105,210,231,.08),transparent 36%),
    linear-gradient(0deg,rgba(224,228,204,.10),transparent 28%);
  opacity:1;
}
.auth-brand-panel::after,
.auth-brand-lockup,
.auth-brand-copy,
.auth-brand-features,
.auth-brand-kicker { display:none !important; }
.auth-container {
  justify-content:flex-start;
  padding:32px 46px 30px;
  scrollbar-gutter:stable;
}
.auth-container .auth-tabs,
.auth-container .auth-form { width:100%; max-width:360px; }
.auth-container .auth-tabs {
  display:flex;
  justify-content:flex-start;
  gap:34px;
  margin-bottom:28px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.auth-container .auth-tab {
  position:relative;
  flex:0 0 auto;
  min-height:34px;
  padding:0 0 10px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#607780;
  box-shadow:none;
}
.auth-container .auth-tab span { display:none; }
.auth-container .auth-tab::after {
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  left:0;
  display:block;
  height:2px;
  border-radius:2px;
  background:transparent;
}
.auth-container .auth-tab.active {
  border:0;
  background:transparent;
  color:#112b46;
  box-shadow:none;
}
.auth-container .auth-tab.active::after { display:block; background:#42b9cf; }
.auth-container .auth-tab:hover,
.auth-container .auth-tab:active {
  border:0;
  background:transparent;
  color:#112b46;
  box-shadow:none;
}
.auth-form-head { margin-bottom:18px; }
.auth-container .auth-form h2 { font-size:25px; }
.auth-form-head p { margin-top:6px; font-size:12px; }
.auth-mode-tabs {
  gap:28px;
  margin-bottom:20px;
  border:0;
  background:transparent;
}
.auth-mode-tab { color:#607780; }
.auth-mode-tab.is-active { color:#112b46; }
.auth-mode-tab:hover,
.auth-mode-tab:active { background:transparent; color:#112b46; box-shadow:none; }
.auth-container .form-group { width:100%; margin-bottom:14px; }
.auth-container .form-group > label { margin-bottom:7px; }
.auth-input-wrap {
  min-height:46px;
  padding:0 13px;
  border-color:#cadbd5;
  background:#fbfdf9 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86);
}
.auth-input-wrap:hover { border-color:#9dc6c2; background:#fff !important; }
.auth-input-wrap:focus-within {
  border-color:#4ebed4 !important;
  background:#fff !important;
  box-shadow:0 0 0 3px rgba(105,210,231,.19) !important;
}
.auth-container .auth-input-wrap input,
body.light-theme .auth-container .auth-input-wrap input {
  height:44px;
  background:transparent !important;
  color:#112b46 !important;
  caret-color:#247e90;
}
.auth-container .auth-input-wrap input::placeholder { color:#5f767d !important; }
.auth-input-wrap > i,.auth-input-wrap > span,.auth-password-toggle { color:#607b82; }
.auth-password-toggle:hover { background:#edf7f3; color:#234c5b; }
.auth-code-group .btn {
  min-height:46px;
  border-color:#b9d4d0;
  background:#edf7f3;
  color:#112b46;
}
.auth-code-group .btn:hover:not(:disabled) { border-color:#69d2e7; background:#dff3ef; color:#173d4b; }
.auth-field-message,.auth-form-message { min-height:0; }
.auth-field-message:empty,.auth-form-message:empty { display:none; }
.auth-field-message.auth-field-hint { display:block; }
.auth-container .form-group.has-error .auth-input-wrap { background:#fffaf7 !important; }
.auth-container .auth-submit {
  min-height:46px;
  margin-top:2px;
  border-color:#4ebed4;
  background:#69d2e7;
  color:#112b46;
  box-shadow:0 9px 22px rgba(31,111,126,.18);
}
.auth-container .auth-submit:hover:not(:disabled) {
  border-color:#42aec3;
  background:#5bc7dc;
  box-shadow:0 12px 25px rgba(31,111,126,.22);
}
.auth-legal a,.auth-agree-label a { color:#236b78; }
.auth-modal .modal-close { background:rgba(255,255,255,.84); color:#244b5c; }
.auth-modal .modal-close:hover { border-color:#69d2e7; background:#dff3ef; color:#112b46; }
.auth-modal .modal-close:focus-visible,
.auth-tab:focus-visible,
.auth-mode-tab:focus-visible,
.auth-password-toggle:focus-visible,
.auth-code-group .btn:focus-visible,
.auth-submit:focus-visible,
.auth-agree-label input:focus-visible { outline-color:rgba(105,210,231,.52); }

body:not(.light-theme) .auth-modal { background:rgba(2,18,29,.72); }
body:not(.light-theme) .auth-container { background:#102d42 !important; }
body:not(.light-theme) .auth-container .auth-tabs { border:0; background:transparent; }
body:not(.light-theme) .auth-container .auth-tab { color:#b9cdd0; }
body:not(.light-theme) .auth-container .auth-tab.active { border:0; background:transparent; color:#fff; }
body:not(.light-theme) .auth-container .auth-tab:hover,
body:not(.light-theme) .auth-container .auth-tab:active { background:transparent; color:#fff; }
body:not(.light-theme) .auth-mode-tabs { border:0; background:transparent; }
body:not(.light-theme) .auth-mode-tab { color:#b9cdd0; }
body:not(.light-theme) .auth-mode-tab.is-active { color:#fff; }
body:not(.light-theme) .auth-mode-tab:hover,
body:not(.light-theme) .auth-mode-tab:active { background:transparent; color:#fff; }
body:not(.light-theme) .auth-input-wrap {
  border-color:#557c8c;
  background:#21495b !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
body:not(.light-theme) .auth-input-wrap:hover { border-color:#70a0ad; background:#254f61 !important; }
body:not(.light-theme) .auth-input-wrap:focus-within { border-color:#69d2e7 !important; background:#254f61 !important; }
body:not(.light-theme) .auth-container .auth-input-wrap input { color:#f1f6ed !important; caret-color:#8ee3f3; }
body:not(.light-theme) .auth-container .auth-input-wrap input::placeholder { color:#bdd0d4 !important; }
body:not(.light-theme) .auth-input-wrap > i,
body:not(.light-theme) .auth-input-wrap > span,
body:not(.light-theme) .auth-password-toggle { color:#c1d3d4; }
body:not(.light-theme) .auth-input-wrap > span { border-right-color:#628494; }
body:not(.light-theme) .auth-password-toggle:hover { background:#31586a; color:#f1f6ed; }
body:not(.light-theme) .auth-code-group .btn { border-color:#557c8c; background:#21495b; color:#fff; }
body:not(.light-theme) .auth-input-wrap input:-webkit-autofill {
  -webkit-text-fill-color:#f1f6ed;
  box-shadow:0 0 0 1000px #21495b inset !important;
}
body:not(.light-theme) .auth-container .form-group.has-error .auth-input-wrap { background:#3a4650 !important; }
body:not(.light-theme) .auth-legal a,
body:not(.light-theme) .auth-agree-label a { color:#8edce9; }

@media (max-width:900px) {
  .auth-modal .auth-shell {
    grid-template-columns:minmax(300px,.80fr) minmax(400px,1.20fr);
    width:min(850px,calc(100vw - 28px));
  }
  .auth-container { padding:30px 34px 28px; }
}
@media (max-width:760px) {
  .auth-modal { padding:10px; }
  .auth-modal .auth-shell {
    display:flex;
    flex-direction:column;
    width:min(100%,500px);
    min-height:0;
    max-height:calc(100dvh - 20px);
    overflow:auto;
    border-radius:17px;
  }
  .auth-brand-panel {
    flex:0 0 168px;
    min-height:168px;
    padding:0;
    border-radius:16px 16px 0 0;
    background-position:center 45%;
  }
  .auth-brand-logo { top:16px; left:16px; width:42px; height:42px; border-radius:12px; }
  .auth-container { flex:0 0 auto; overflow:visible; padding:24px 24px 26px; }
  .auth-container .auth-tabs { margin-bottom:22px; }
}
@media (max-width:460px) {
  .auth-brand-panel { flex-basis:142px; min-height:142px; padding:0; background-position:center 43%; }
  .auth-brand-logo { top:13px; left:13px; width:38px; height:38px; border-radius:11px; }
  .auth-container { padding:22px 17px 24px; }
  .auth-code-group { grid-template-columns:minmax(0,1fr) 104px; }
  .auth-register-passwords { grid-template-columns:1fr; gap:0; }
}

/* Authentication v7 final layer: branded primary switch and campus-horizon anime cover. */
.auth-brand-panel {
  position:relative;
  background:
    linear-gradient(180deg,rgba(247,252,251,.12),rgba(247,252,251,.02) 40%,rgba(17,43,70,.04)),
    url("../assets/auth-campus-horizon-v4.jpg") 50% 55%/cover no-repeat,
    #dff4ef;
}
.auth-brand-signature {
  position:absolute;
  z-index:2;
  top:24px;
  left:24px;
  display:flex;
  align-items:center;
  gap:11px;
  min-width:178px;
  padding:7px 13px 7px 7px;
  border:1px solid rgba(255,255,255,.48);
  border-radius:16px;
  background:rgba(250,255,253,.74);
  box-shadow:0 10px 26px rgba(17,43,70,.12);
  backdrop-filter:blur(13px) saturate(120%);
}
.auth-brand-signature .auth-brand-logo {
  position:static;
  flex:0 0 48px;
  width:48px;
  height:48px;
  border-radius:13px;
  object-fit:cover;
  box-shadow:0 8px 20px rgba(17,43,70,.14);
}
.auth-brand-name {
  display:flex;
  flex-direction:column;
  min-width:0;
}
.auth-brand-name strong {
  color:#112b46;
  font-size:15px;
  font-weight:820;
  letter-spacing:-.02em;
  line-height:1.25;
}
.auth-brand-name span {
  margin-top:2px;
  color:#486879;
  font-size:9px;
  font-weight:600;
  line-height:1.3;
}

.auth-container .auth-tabs {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px;
  margin-bottom:28px;
  padding:4px;
  border:0;
  border-radius:12px;
  background:#edf7f3;
  box-shadow:none !important;
}
.auth-container .auth-tab {
  position:relative;
  min-height:38px;
  padding:0 14px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#516b73;
  box-shadow:none !important;
  text-align:center;
}
.auth-container .auth-tab::after,
.auth-container .auth-tab.active::after { display:none; }
.auth-container .auth-tab.active {
  border:0;
  background:#112b46;
  color:#f7fbf8;
  box-shadow:none !important;
}
.auth-container .auth-tab:hover,
.auth-container .auth-tab:active {
  border:0;
  background:rgba(105,210,231,.13);
  color:#112b46;
  box-shadow:none !important;
}
.auth-container .auth-tab.active:hover,
.auth-container .auth-tab.active:active { background:#112b46; color:#f7fbf8; }

.auth-mode-tabs {
  gap:28px;
  border:0;
  background:transparent;
  box-shadow:none !important;
}
.auth-mode-tab,
.auth-mode-tab:hover,
.auth-mode-tab:active,
.auth-mode-tab.is-active {
  border:0;
  background:transparent;
  box-shadow:none !important;
}
.auth-mode-tab { color:#607780; }
.auth-mode-tab:hover,
.auth-mode-tab:active,
.auth-mode-tab.is-active { color:#112b46; }
.auth-mode-tab.is-active::after { background:#42b9cf; }

body:not(.light-theme) .auth-container .auth-tabs {
  border:0;
  background:#18384d;
  box-shadow:none !important;
}
body:not(.light-theme) .auth-container .auth-tab { color:#b9cdd0; }
body:not(.light-theme) .auth-container .auth-tab:hover,
body:not(.light-theme) .auth-container .auth-tab:active { background:#21495b; color:#f1f6ed; }
body:not(.light-theme) .auth-container .auth-tab.active,
body:not(.light-theme) .auth-container .auth-tab.active:hover,
body:not(.light-theme) .auth-container .auth-tab.active:active {
  border:0;
  background:#a7dbd8;
  color:#112b46;
  box-shadow:none !important;
}
body:not(.light-theme) .auth-mode-tabs,
body:not(.light-theme) .auth-mode-tab,
body:not(.light-theme) .auth-mode-tab:hover,
body:not(.light-theme) .auth-mode-tab:active,
body:not(.light-theme) .auth-mode-tab.is-active {
  border:0;
  background:transparent;
  box-shadow:none !important;
}
body:not(.light-theme) .auth-mode-tab { color:#b9cdd0; }
body:not(.light-theme) .auth-mode-tab:hover,
body:not(.light-theme) .auth-mode-tab:active,
body:not(.light-theme) .auth-mode-tab.is-active { color:#f1f6ed; }

body.light-theme .auth-container .auth-tab.active,
body.light-theme .auth-container .auth-tab.active:hover,
body.light-theme .auth-container .auth-tab.active:active {
  border:0;
  background:#112b46;
  color:#f7fbf8;
  box-shadow:none !important;
}
body.light-theme .auth-mode-tabs,
body.light-theme .auth-mode-tab,
body.light-theme .auth-mode-tab:hover,
body.light-theme .auth-mode-tab:active,
body.light-theme .auth-mode-tab.is-active {
  border:0;
  background:transparent;
  box-shadow:none !important;
}
body.light-theme .auth-mode-tab { color:#607780; }
body.light-theme .auth-mode-tab:hover,
body.light-theme .auth-mode-tab:active,
body.light-theme .auth-mode-tab.is-active { color:#112b46; }

.auth-mode-tabs {
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  gap:28px;
}
.auth-mode-tab {
  flex:0 0 auto;
  width:auto;
  min-width:0;
  padding-right:0;
  padding-left:0;
}
body:not(.light-theme) .auth-container .auth-input-wrap {
  border-color:#557c8c;
  background:#21495b !important;
}
body:not(.light-theme) .auth-container .auth-input-wrap:hover,
body:not(.light-theme) .auth-container .auth-input-wrap:focus-within { background:#254f61 !important; }
body:not(.light-theme) .auth-container .auth-submit,
body:not(.light-theme) .auth-container .auth-submit:hover:not(:disabled) {
  border-color:#4ebed4;
  background:#69d2e7;
  color:#112b46;
  box-shadow:0 9px 22px rgba(31,111,126,.20);
}

@media (max-width:760px) {
  .auth-brand-signature { top:15px; left:15px; min-width:164px; padding:6px 11px 6px 6px; border-radius:14px; }
  .auth-brand-signature .auth-brand-logo { flex-basis:40px; width:40px; height:40px; border-radius:11px; }
  .auth-brand-name strong { font-size:14px; }
  .auth-brand-name span { font-size:8px; }
}
@media (max-width:460px) {
  .auth-brand-signature { top:12px; left:12px; min-width:154px; }
  .auth-brand-signature .auth-brand-logo { flex-basis:36px; width:36px; height:36px; border-radius:10px; }
}

/* Authentication v8: remove repeated copy and let the form set the rhythm. */
.auth-modal .auth-shell {
  min-height:0;
  height:auto;
}
.auth-brand-panel { min-height:0; }
.auth-brand-signature {
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.auth-brand-signature .auth-brand-logo { box-shadow:none; }
.auth-brand-name strong,
.auth-brand-name span {
  color:#112b46;
  text-shadow:0 1px 1px rgba(255,255,255,.90),0 2px 10px rgba(255,255,255,.72);
}
.auth-container .auth-tabs { margin-bottom:26px; }
.auth-container .auth-tab { transition:none; }
.auth-mode-tabs {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
  gap:0;
  width:100%;
  margin:0 0 20px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none !important;
}
.auth-mode-tab {
  width:100%;
  min-width:0;
  min-height:36px;
  padding:0 12px 11px;
  text-align:center;
}
.auth-mode-tab::after {
  right:auto;
  left:50%;
  width:28px;
  transform:translateX(-50%);
}
.auth-mode-tab,
.auth-mode-tab:hover,
.auth-mode-tab:active,
.auth-mode-tab.is-active {
  border:0;
  background:transparent;
  box-shadow:none !important;
}

@media (max-width:760px) {
  .auth-modal .auth-shell { min-height:0; }
  .auth-brand-panel { min-height:168px; }
  .auth-brand-signature { min-width:0; padding:0; border-radius:0; }
}
@media (max-width:460px) {
  .auth-brand-panel { min-height:142px; }
  .auth-brand-signature { min-width:0; }
}

/* Authentication v9: SMS verification is the only login and registration path. */
#loginForm .form-group,
#registerForm .form-group { margin-bottom:16px; }
#loginForm .auth-code-group,
#registerForm .auth-code-group { grid-template-columns:minmax(0,1fr) 118px; }
#loginForm .auth-submit,
#registerForm .auth-submit { margin-top:0; }
#registerForm .auth-agree { margin-top:-2px !important; margin-bottom:14px; }

@media (max-width:460px) {
  #loginForm .auth-code-group,
  #registerForm .auth-code-group { grid-template-columns:minmax(0,1fr) 108px; }
}

/* Authentication v12: portrait proportion, one flush focus ring and aligned consent. */
@media (min-width:761px) {
  .auth-modal .auth-shell { min-height:min(560px,calc(100dvh - 32px)); }
  .auth-container { justify-content:center; }
}

#authModal .auth-container .auth-input-wrap input,
#authModal .auth-container .auth-input-wrap input:focus,
#authModal .auth-container .auth-input-wrap input:focus-visible {
  outline:none !important;
  border:0 !important;
  box-shadow:none !important;
  transition:color 150ms ease,background-color 150ms ease !important;
}
.auth-container .auth-input-wrap:focus-within {
  border-color:#4ebed4 !important;
  box-shadow:0 0 0 2px rgba(105,210,231,.30) !important;
}
body:not(.light-theme) .auth-container .auth-input-wrap:focus-within {
  border-color:#69d2e7 !important;
  box-shadow:0 0 0 2px rgba(105,210,231,.26) !important;
}

.auth-container .form-group > label.auth-agree-label {
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:0;
  font-size:10px;
  line-height:16px;
}
.auth-container .form-group > label.auth-agree-label input[type="checkbox"] {
  flex:0 0 16px;
  width:16px;
  height:16px;
  margin:0;
}
.auth-container .form-group > label.auth-agree-label > span {
  display:block;
  min-width:0;
  line-height:16px;
}

/* Workspace v13: compact border-light rewrite, visible credits and orders. */
.credits-badge {
  border:0;
  font-family:inherit;
  cursor:pointer;
  box-shadow:none;
}
.credits-badge:hover { background:#dff3ef; }
.credits-badge:focus-visible { outline:3px solid var(--ocean-focus); outline-offset:2px; }
.credits-badge-label { font-size:10px; font-weight:700; opacity:.72; }
.account-menu-shortcuts {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-top:10px;
}
.account-menu-shortcuts button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:36px;
  padding:7px 8px;
  border:0;
  border-radius:9px;
  background:rgba(105,210,231,.10);
  color:var(--ui-text-secondary);
  font:inherit;
  font-size:10px;
  font-weight:750;
  cursor:pointer;
}
.account-menu-shortcuts button:hover { background:rgba(105,210,231,.18); color:var(--ui-text); }
.account-menu-shortcuts button:focus-visible { outline:3px solid var(--ocean-focus); outline-offset:1px; }

.rewrite-page { min-height:calc(100dvh - 64px) !important; }
.rewrite-wrap { padding-top:28px !important; padding-bottom:36px !important; }
.rewrite-header { margin-bottom:18px !important; }
.rewrite-editor-card {
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.rewrite-result-card { background:transparent !important; }
body.light-theme .rewrite-page .rewrite-editor-card,
body.light-theme .rewrite-page .rewrite-result-card,
body:not(.light-theme) .rewrite-page .rewrite-editor-card,
body:not(.light-theme) .rewrite-page .rewrite-result-card {
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
#originalText,#rewriteContent {
  border:0 !important;
  background:var(--ui-surface-soft) !important;
  box-shadow:inset 0 0 0 1px transparent !important;
}
body.light-theme .rewrite-page #originalText,
body.light-theme .rewrite-page #rewriteContent,
body:not(.light-theme) .rewrite-page #originalText,
body:not(.light-theme) .rewrite-page #rewriteContent {
  border:0 !important;
  box-shadow:inset 0 0 0 1px transparent !important;
}
#originalText:focus {
  border:0 !important;
  box-shadow:inset 0 0 0 1px var(--ocean-cyan),0 0 0 3px var(--ocean-focus) !important;
}
.rewrite-clear-btn {
  border:0 !important;
  background:rgba(243,134,48,.10) !important;
  box-shadow:none !important;
}
.rewrite-cost-panel {
  border:0 !important;
  background:var(--ui-surface-soft) !important;
  box-shadow:none !important;
}
.rewrite-recharge-link {
  border:0 !important;
  background:rgba(243,134,48,.11) !important;
  color:var(--ocean-orange) !important;
  box-shadow:none !important;
}
.rewrite-recharge-link:hover { background:rgba(243,134,48,.18) !important; }
.rewrite-recharge-link:focus-visible { outline:3px solid rgba(243,134,48,.22); outline-offset:2px; }
.rewrite-rate-note {
  margin-top:10px;
  padding-left:0;
  border:0;
  background:transparent !important;
}

.orders-page { min-height:calc(100dvh - 64px) !important; padding-bottom:40px !important; }
.orders-wrap { padding:28px 24px 36px !important; }
.orders-header { margin-bottom:20px !important; }
.orders-eyebrow { display:none !important; }
.orders-tabs {
  gap:24px !important;
  margin-bottom:18px !important;
  border-bottom:1px solid var(--ui-border) !important;
  background:transparent !important;
}
.orders-tabs .otab {
  position:relative;
  padding:10px 0 12px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.orders-tabs .otab::after {
  content:"";
  position:absolute;
  right:0;
  bottom:-1px;
  left:0;
  height:2px;
  background:transparent;
}
.orders-tabs .otab.on,body:not(.light-theme) .orders-tabs .otab.on {
  border-color:transparent !important;
  background:transparent !important;
  color:var(--ui-text) !important;
  box-shadow:none !important;
}
.orders-tabs .otab.on::after { background:var(--ocean-cyan); }
.order-card {
  margin-bottom:0 !important;
  padding:16px 4px !important;
  border:0 !important;
  border-bottom:1px solid var(--ui-border) !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
body.light-theme .orders-page .order-card,
body:not(.light-theme) .orders-page .order-card {
  border:0 !important;
  border-bottom:1px solid var(--ui-border) !important;
  background:transparent !important;
  box-shadow:none !important;
}
.pkg-grid { gap:12px !important; }
.pkgcard {
  padding:22px 18px 18px !important;
  border:0 !important;
  background:var(--ui-surface-soft) !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  transform:none !important;
}
.pkgcard:hover,.pkgcard.popular,.pkgcard.free-card,.pkgcard.free-card:hover {
  border:0 !important;
  background:color-mix(in srgb,var(--ui-surface-soft) 88%,var(--ocean-mint)) !important;
  box-shadow:none !important;
  transform:none !important;
}
body.light-theme .orders-page .pkgcard,
body.light-theme .orders-page .pkgcard:hover,
body.light-theme .orders-page .pkgcard.popular,
body.light-theme .orders-page .pkgcard.free-card,
body:not(.light-theme) .orders-page .pkgcard,
body:not(.light-theme) .orders-page .pkgcard:hover,
body:not(.light-theme) .orders-page .pkgcard.popular,
body:not(.light-theme) .orders-page .pkgcard.free-card {
  border:0 !important;
  background:var(--ui-surface-soft) !important;
  box-shadow:none !important;
  transform:none !important;
}
.orders-info-card {
  padding:18px 0 !important;
  border:0 !important;
  border-top:1px solid var(--ui-border) !important;
  border-radius:0 !important;
  background:transparent !important;
}

@media (max-width:760px) {
  .credits-badge-label { display:none; }
  .rewrite-wrap { padding:22px 16px 28px !important; }
  .rewrite-header { align-items:flex-start !important; flex-direction:column; gap:14px; }
  .rewrite-header-actions { width:100%; justify-content:flex-start !important; }
  .rewrite-editor-grid { grid-template-columns:1fr !important; gap:22px !important; }
  .rewrite-toolbar { align-items:stretch !important; flex-wrap:wrap; }
  #rewriteVersionTabs { flex:1 1 100%; }
  #rewriteVersionTabs button { flex:1 1 0; }
  .rewrite-cost-panel { min-height:46px; }
  #rewriteBtn,#cancelRewriteBtn { flex:1 1 150px; padding-right:20px !important; padding-left:20px !important; }
  .orders-wrap { padding:22px 16px 30px !important; }
}

/* Workspace v14: retain page fills, restore only useful boundaries and form hierarchy. */
.auth-form-intro {
  margin:-2px 0 20px;
  text-align:left;
}
.auth-container .auth-form-intro h2 {
  margin:0;
  color:var(--ui-text);
  font-size:22px;
  font-weight:800;
  letter-spacing:-.035em;
  line-height:1.25;
}
.auth-form-intro p {
  margin:7px 0 0;
  color:var(--ui-text-muted);
  font-size:11px;
  font-weight:500;
  line-height:1.55;
}

body.light-theme .rewrite-page #originalText,
body:not(.light-theme) .rewrite-page #originalText {
  border:1px solid var(--ui-border) !important;
  box-shadow:none !important;
}
body.light-theme .rewrite-page #rewriteContent,
body:not(.light-theme) .rewrite-page #rewriteContent {
  border:1px solid var(--ocean-line-strong) !important;
  box-shadow:none !important;
}
body.light-theme .rewrite-page #originalText:focus,
body:not(.light-theme) .rewrite-page #originalText:focus {
  border-color:var(--ocean-cyan) !important;
  box-shadow:0 0 0 3px var(--ocean-focus) !important;
}

@media (max-width:760px) {
  .auth-form-intro { margin-bottom:18px; }
  .auth-container .auth-form-intro h2 { font-size:20px; }
}

/* Authentication v15: repeat the brand promise and lighten form surfaces. */
body.light-theme #authModal .auth-input-wrap {
  border-color:#d0e7e3 !important;
  background:#f6fbfa !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86);
}
body.light-theme #authModal .auth-input-wrap:hover {
  border-color:#b9ddd7 !important;
  background:#f2faf8 !important;
}
body.light-theme #authModal .auth-input-wrap:focus-within {
  border-color:#42b9cf !important;
  background:#f8fdfc !important;
  box-shadow:0 0 0 2px rgba(105,210,231,.22) !important;
}
body.light-theme #authModal .auth-code-group .btn {
  border-color:#d0e7e3;
  background:#f1f9f7;
}
body.light-theme #authModal .auth-code-group .btn:hover:not(:disabled) {
  border-color:#b9ddd7;
  background:#ebf7f4;
}

body:not(.light-theme) #authModal .auth-input-wrap {
  border-color:#4f8191 !important;
  background:#17495a !important;
}
body:not(.light-theme) #authModal .auth-input-wrap:hover,
body:not(.light-theme) #authModal .auth-input-wrap:focus-within {
  background:#1b5362 !important;
}
body:not(.light-theme) #authModal .auth-code-group .btn {
  border-color:#4f8191;
  background:#1b4d5f;
}

#authModal .auth-container .auth-input-wrap input,
#authModal .auth-container .auth-input-wrap input:hover,
#authModal .auth-container .auth-input-wrap input:focus,
#authModal .auth-container .auth-input-wrap input:focus-visible {
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
}

/* Authentication v16: keep each field visually continuous and tune ensemble cropping. */
#authModal .auth-container .auth-input-wrap > span,
#authModal .auth-container .auth-input-wrap > i {
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
}
#authModal .auth-container .auth-input-wrap input:-webkit-autofill,
#authModal .auth-container .auth-input-wrap input:-webkit-autofill:hover,
#authModal .auth-container .auth-input-wrap input:-webkit-autofill:focus {
  -webkit-background-clip:text !important;
  transition:background-color 99999s ease-out 0s !important;
}
@media (max-width:760px) {
  .auth-brand-panel { background-position:50% 80%; }
}
@media (max-width:460px) {
  .auth-brand-panel { flex-basis:156px; min-height:156px; }
}

/* Home v2: restrained product overview with a real interactive feature selector. */
.home-v2 {
  --home-bg:#082538;
  --home-surface:#102f43;
  --home-surface-raised:#15394d;
  --home-soft:#123449;
  --home-line:rgba(174,218,220,.18);
  --home-text:#f1f6ed;
  --home-text-secondary:#c7d9d8;
  --home-muted:#95b2b5;
  --home-accent:#69d2e7;
  --home-accent-soft:rgba(105,210,231,.12);
  position:relative;
  min-height:calc(100dvh - 64px);
  overflow:hidden;
  background:var(--home-bg);
  color:var(--home-text);
}
body.light-theme .home-v2 {
  --home-bg:#f5faf8;
  --home-surface:#fbfefd;
  --home-surface-raised:#fff;
  --home-soft:#edf7f3;
  --home-line:#d5e7e3;
  --home-text:#112b46;
  --home-text-secondary:#3f5f70;
  --home-muted:#667f87;
  --home-accent:#42b9cf;
  --home-accent-soft:#dff3ef;
}
.home-v2-atmosphere { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.home-v2-atmosphere span { position:absolute; border-radius:50%; opacity:.36; filter:blur(1px); }
.home-v2-atmosphere span:first-child { top:-280px; right:-180px; width:640px; height:640px; background:rgba(105,210,231,.14); }
.home-v2-atmosphere span:last-child { top:620px; left:-260px; width:540px; height:540px; background:rgba(167,219,216,.10); }
body.light-theme .home-v2-atmosphere span:first-child { background:rgba(105,210,231,.17); }
body.light-theme .home-v2-atmosphere span:last-child { background:rgba(167,219,216,.20); }
.home-v2-shell { position:relative; z-index:1; width:min(1180px,calc(100% - 56px)); margin:0 auto; padding:58px 0 64px; }
.home-v2-hero { display:grid; grid-template-columns:minmax(360px,.82fr) minmax(570px,1.18fr); align-items:center; gap:72px; min-height:620px; }
.home-v2-copy { align-self:center; max-width:500px; }
.home-v2-kicker { display:inline-flex; align-items:center; gap:8px; margin-bottom:20px; color:var(--home-text-secondary); font-size:11px; font-weight:750; letter-spacing:.06em; }
.home-v2-kicker i { color:var(--home-accent); font-size:10px; }
.home-v2-copy h1 { margin:0; color:var(--home-text); font-size:clamp(44px,5.2vw,64px); font-weight:840; letter-spacing:-.06em; line-height:1.12; }
.home-v2-copy h1 strong { display:block; color:var(--home-accent); font:inherit; }
body.light-theme .home-v2-copy h1 strong { color:#21869a; }
.home-v2-copy > p { max-width:465px; margin:24px 0 0; color:var(--home-muted); font-size:15px; line-height:1.85; }
.home-v2-actions { display:flex; align-items:center; gap:11px; margin-top:31px; }
.home-v2-primary,.home-v2-secondary {
  display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:48px; padding:11px 21px;
  border-radius:11px; font:inherit; font-size:12px; font-weight:800; cursor:pointer;
  transition:transform 150ms ease,border-color 150ms ease,background-color 150ms ease,color 150ms ease;
}
.home-v2-primary { border:1px solid var(--home-accent); background:var(--home-accent); color:#112b46; }
.home-v2-primary:hover { border-color:#8ee3f3; background:#8ee3f3; }
.home-v2-secondary { border:1px solid var(--home-line); background:transparent; color:var(--home-text-secondary); }
.home-v2-secondary:hover { border-color:var(--home-accent); background:var(--home-accent-soft); color:var(--home-text); }
.home-v2-primary:active,.home-v2-secondary:active,.home-v2-preview-action:active,.home-v2-feature-card:active { transform:translateY(1px) scale(.985); }
.home-v2-primary:focus-visible,.home-v2-secondary:focus-visible,.home-v2-preview-action:focus-visible,.home-v2-feature-tabs button:focus-visible,.home-v2-feature-card:focus-visible { outline:3px solid rgba(105,210,231,.30); outline-offset:2px; }
.home-v2-note { display:flex; align-items:center; gap:8px; margin-top:21px; color:var(--home-muted); font-size:10px; }
.home-v2-note i { display:grid; place-items:center; width:17px; height:17px; border-radius:50%; background:var(--home-accent-soft); color:var(--home-accent); font-size:8px; }

.home-v2-preview { min-width:0; padding:20px; border:1px solid var(--home-line); border-radius:18px; background:color-mix(in srgb,var(--home-surface) 96%,transparent); box-shadow:0 28px 80px rgba(0,12,22,.20); }
body.light-theme .home-v2-preview { box-shadow:0 22px 60px rgba(37,76,112,.09); }
.home-v2-preview-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-bottom:16px; border-bottom:1px solid var(--home-line); }
.home-v2-preview-head > div { display:flex; align-items:center; gap:10px; }
.home-v2-preview-head strong { color:var(--home-text); font-size:12px; }
.home-v2-preview-head > span { color:var(--home-muted); font-size:9px; font-weight:800; letter-spacing:.14em; }
.home-v2-preview-mark,.home-v2-preview-icon,.home-v2-card-icon { display:grid; place-items:center; background:var(--home-accent-soft); color:var(--home-accent); }
.home-v2-preview-mark { width:31px; height:31px; border-radius:9px; font-size:11px; }
.home-v2-feature-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin:15px 0; padding:4px; border-radius:12px; background:var(--home-soft); }
.home-v2-feature-tabs button { display:flex; align-items:center; justify-content:center; gap:7px; min-width:0; min-height:39px; padding:7px 6px; border:0; border-radius:8px; background:transparent; color:var(--home-muted); font:inherit; font-size:9px; font-weight:750; cursor:pointer; }
.home-v2-feature-tabs button i { font-size:10px; }
.home-v2-feature-tabs button:hover { color:var(--home-text); }
.home-v2-feature-tabs button.is-active { background:var(--home-surface-raised); color:var(--home-text); box-shadow:0 2px 8px rgba(0,15,25,.10); }
.home-v2-preview-body { min-height:344px; padding:17px 18px 18px; border:1px solid var(--home-line); border-radius:14px; background:var(--home-surface-raised); }
.home-v2-preview-title { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.home-v2-preview-title > div { display:flex; align-items:center; gap:11px; min-width:0; }
.home-v2-preview-icon { flex:0 0 39px; width:39px; height:39px; border-radius:11px; font-size:13px; }
.home-v2-preview-title strong,.home-v2-preview-title small { display:block; }
.home-v2-preview-title strong { color:var(--home-text); font-size:13px; }
.home-v2-preview-title small { margin-top:3px; color:var(--home-muted); font-size:9px; }
.home-v2-preview-state { flex:0 0 auto; padding:5px 8px; border-radius:8px; background:var(--home-accent-soft); color:var(--home-accent); font-size:8px; font-weight:800; }
.home-v2-preview-desc { margin:15px 0 17px; color:var(--home-muted); font-size:10px; line-height:1.7; }
.home-v2-flow { display:grid; grid-template-columns:1fr auto 1fr auto 1fr; align-items:center; gap:7px; }
.home-v2-flow > span { display:flex; align-items:center; gap:7px; min-width:0; padding:9px 8px; border:1px solid var(--home-line); border-radius:10px; color:var(--home-text-secondary); font-size:8px; line-height:1.4; }
.home-v2-flow > span b { display:grid; place-items:center; flex:0 0 23px; width:23px; height:23px; border-radius:7px; background:var(--home-soft); color:var(--home-muted); font-size:7px; }
.home-v2-flow > span.is-current { border-color:rgba(105,210,231,.44); background:var(--home-accent-soft); color:var(--home-text); }
.home-v2-flow > span.is-current b { background:var(--home-accent); color:#112b46; }
.home-v2-flow > i { color:var(--home-muted); font-size:7px; }
.home-v2-fields { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:13px; }
.home-v2-fields > div { min-height:56px; padding:10px 12px; border-radius:10px; background:var(--home-soft); }
.home-v2-fields span,.home-v2-fields strong { display:block; }
.home-v2-fields span { color:var(--home-muted); font-size:8px; }
.home-v2-fields strong { margin-top:5px; overflow:hidden; color:var(--home-text-secondary); font-size:9px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.home-v2-preview-action { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:42px; margin-top:13px; padding:9px 13px; border:1px solid var(--home-line); border-radius:10px; background:transparent; color:var(--home-text); font:inherit; font-size:9px; font-weight:800; cursor:pointer; transition:transform 150ms ease,border-color 150ms ease,background-color 150ms ease; }
.home-v2-preview-action:hover { border-color:var(--home-accent); background:var(--home-accent-soft); }
.home-v2-preview-action i { color:var(--home-accent); }

.home-v2-features { padding:80px 0 70px; border-top:1px solid var(--home-line); }
.home-v2-section-heading { max-width:690px; margin-bottom:32px; }
.home-v2-section-heading > span,.home-v2-bottom-cta > div > span { color:var(--home-accent); font-size:9px; font-weight:800; letter-spacing:.10em; }
.home-v2-section-heading h2 { margin:10px 0 0; color:var(--home-text); font-size:32px; font-weight:820; letter-spacing:-.045em; }
.home-v2-section-heading p { max-width:610px; margin:10px 0 0; color:var(--home-muted); font-size:12px; line-height:1.75; }
.home-v2-feature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.home-v2-feature-card { position:relative; display:grid; grid-template-columns:46px minmax(0,1fr) 18px; align-items:center; gap:14px; min-height:112px; padding:18px; border:1px solid var(--home-line); border-radius:14px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; transition:transform 150ms ease,border-color 150ms ease,background-color 150ms ease; }
.home-v2-feature-card:hover,.home-v2-feature-card.is-primary { border-color:rgba(105,210,231,.48); background:var(--home-surface); }
.home-v2-card-icon { width:46px; height:46px; border-radius:12px; font-size:14px; }
.home-v2-card-copy strong,.home-v2-card-copy small { display:block; }
.home-v2-card-copy strong { color:var(--home-text); font-size:13px; }
.home-v2-card-copy small { max-width:390px; margin-top:6px; color:var(--home-muted); font-size:10px; line-height:1.65; }
.home-v2-card-arrow { color:var(--home-muted); font-size:9px; }
.home-v2-feature-card:hover .home-v2-card-arrow,.home-v2-feature-card.is-primary .home-v2-card-arrow { color:var(--home-accent); }
.home-v2-bottom-cta { display:flex; align-items:center; justify-content:space-between; gap:32px; padding:31px 0 7px; border-top:1px solid var(--home-line); }
.home-v2-bottom-cta h2 { margin:8px 0 0; color:var(--home-text); font-size:24px; letter-spacing:-.035em; }

@media (max-width:1040px) {
  .home-v2-shell { width:min(100% - 40px,760px); padding-top:52px; }
  .home-v2-hero { grid-template-columns:1fr; gap:42px; min-height:0; }
  .home-v2-copy { max-width:650px; }
  .home-v2-copy > p { max-width:560px; }
  .home-v2-preview { width:100%; }
}
@media (max-width:680px) {
  .home-v2-shell { width:calc(100% - 30px); padding:39px 0 48px; }
  .home-v2-copy h1 { font-size:40px; }
  .home-v2-copy > p { margin-top:19px; font-size:13px; }
  .home-v2-actions { align-items:stretch; flex-direction:column; margin-top:26px; }
  .home-v2-primary,.home-v2-secondary { width:100%; }
  .home-v2-preview { padding:13px; border-radius:15px; }
  .home-v2-feature-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-v2-preview-body { min-height:0; padding:15px; }
  .home-v2-flow { grid-template-columns:1fr; }
  .home-v2-flow > i { display:none; }
  .home-v2-fields { grid-template-columns:1fr; }
  .home-v2-features { padding:58px 0 52px; }
  .home-v2-section-heading h2 { font-size:27px; }
  .home-v2-feature-grid { grid-template-columns:1fr; }
  .home-v2-feature-card { min-height:102px; }
  .home-v2-bottom-cta { align-items:stretch; flex-direction:column; padding-top:27px; }
}
@media (prefers-reduced-motion:reduce) {
  .home-v2 * { scroll-behavior:auto !important; }
}

/* Product polish v17: one-step access, a lighter writing field and a clearer home journey. */
.nav-brand > img,
.auth-brand-signature .auth-brand-logo {
  object-fit:cover;
  object-position:center;
  background:#f7fcfb;
}
.nav-brand > img {
  flex:0 0 34px;
  width:34px;
  height:34px;
  margin-right:9px;
  border-radius:10px;
  box-shadow:none !important;
}
.auth-brand-signature .auth-brand-logo {
  box-shadow:none !important;
}
.nav-brand { color:#f1f6ed !important; letter-spacing:0; }
body.light-theme .nav-brand { color:#112b46 !important; }

.auth-container .auth-form { max-width:370px; }
.auth-container .auth-form-intro { margin-top:0; margin-bottom:24px; }
.auth-container .auth-form-intro h2 { letter-spacing:0; }
.auth-container .auth-legal { margin-top:12px; }

body.light-theme #wrtAcademicWorkspace .wrt-field-display,
body.light-theme #wrtAcademicWorkspace .wrt-input {
  border-color:#d7ece8 !important;
  background:#fbfefd !important;
}
body.light-theme #wrtAcademicWorkspace .wrt-field-display:hover {
  border-color:#a6dbd3 !important;
  background:#f7fcfb !important;
}
body.light-theme #wrtAcademicWorkspace .wrt-field-display:focus-visible,
body.light-theme #wrtAcademicWorkspace .wrt-field-display:focus-within {
  border-color:#42b9b1 !important;
  background:#fbfffe !important;
  box-shadow:0 0 0 3px rgba(66,185,177,.14) !important;
}
body.light-theme .wrt-field-placeholder,
body.light-theme .wrt-input::placeholder {
  color:#829ba0 !important;
}

/* Navigation v18: keep the full rectangular link box clickable.
   The rounded visual lives on a pointer-transparent layer, so corner clicks
   no longer fall through to .nav-menu. Mobile navigation keeps its own cards. */
@media (min-width:769px) {
  .nav-menu .nav-link {
    position:relative;
    isolation:isolate;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }
  .nav-menu .nav-link::before {
    content:"";
    position:absolute;
    z-index:-1;
    inset:0;
    border-radius:10px;
    background:transparent;
    box-shadow:none;
    pointer-events:none;
    transition:background-color 120ms ease,box-shadow 120ms ease;
  }
  .nav-menu .nav-link:hover::before {
    background:rgba(105,210,231,.09);
  }
  .nav-menu .nav-link.active::before {
    background:rgba(105,210,231,.14);
    box-shadow:inset 0 0 0 1px rgba(105,210,231,.20);
  }
  body.light-theme .nav-menu .nav-link:hover:not(.active)::before {
    background:#f3faf8;
  }
  body.light-theme .nav-menu .nav-link.active::before {
    background:#dff3ef;
    box-shadow:none;
  }
  .nav-menu .nav-link:focus-visible {
    outline:none !important;
  }
  .nav-menu .nav-link:focus-visible::before {
    box-shadow:0 0 0 3px var(--ocean-focus);
  }
}

.home-v2-atmosphere { display:none; }
.home-v2-shell {
  width:min(1240px,calc(100% - 64px));
  padding-top:72px;
}
.home-v2-hero {
  grid-template-columns:minmax(380px,.86fr) minmax(590px,1.14fr);
  gap:84px;
  min-height:640px;
}
.home-v2-copy { max-width:530px; }
.home-v2-kicker { letter-spacing:0; }
.home-v2-copy h1 {
  max-width:520px;
  font-size:64px;
  letter-spacing:0;
  line-height:1.13;
}
.home-v2-copy > p { max-width:500px; font-size:16px; }
.home-v2-section-heading > span,
.home-v2-bottom-cta > div > span,
.home-v2-preview-head > span { letter-spacing:0; }
.home-v2-section-heading h2,
.home-v2-bottom-cta h2 { letter-spacing:0; }

.home-v2-journey {
  display:grid;
  grid-template-columns:minmax(280px,.82fr) minmax(640px,1.18fr);
  align-items:center;
  gap:64px;
  padding:34px 0;
  border-top:1px solid var(--home-line);
  border-bottom:1px solid var(--home-line);
}
.home-v2-journey-heading > span {
  color:var(--home-accent);
  font-size:9px;
  font-weight:800;
}
.home-v2-journey-heading h2 {
  max-width:420px;
  margin:9px 0 0;
  color:var(--home-text);
  font-size:22px;
  font-weight:800;
  letter-spacing:0;
  line-height:1.45;
}
.home-v2-journey-rail {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:11px;
}
.home-v2-journey-rail > i { color:var(--home-muted); font-size:8px; }
.home-v2-journey-rail button {
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-width:0;
  padding:10px 0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.home-v2-journey-rail button b {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:9px;
  background:var(--home-soft);
  color:var(--home-muted);
  font-size:9px;
}
.home-v2-journey-rail button strong,
.home-v2-journey-rail button small { display:block; }
.home-v2-journey-rail button strong { color:var(--home-text-secondary); font-size:11px; }
.home-v2-journey-rail button small { margin-top:4px; color:var(--home-muted); font-size:8px; line-height:1.45; }
.home-v2-journey-rail button:hover b,
.home-v2-journey-rail button.is-active b { background:var(--home-accent); color:#112b46; }
.home-v2-journey-rail button:hover strong,
.home-v2-journey-rail button.is-active strong { color:var(--home-text); }
.home-v2-journey-rail button:focus-visible { outline:3px solid rgba(105,210,231,.30); outline-offset:3px; }

.home-v2-features { border-top:0; }

@media (min-width:901px) and (max-width:1120px) {
  .home-v2-shell { width:calc(100% - 40px); padding-top:52px; }
  .home-v2-hero {
    grid-template-columns:minmax(330px,.82fr) minmax(520px,1.18fr);
    gap:40px;
    min-height:620px;
  }
  .home-v2-copy h1 { font-size:52px; }
  .home-v2-copy > p { font-size:14px; }
}
@media (max-width:900px) {
  .home-v2-shell { width:min(100% - 40px,820px); padding-top:54px; }
  .home-v2-hero { grid-template-columns:1fr; gap:46px; min-height:0; }
  .home-v2-journey { grid-template-columns:1fr; gap:24px; margin-top:56px; }
}
@media (max-width:680px) {
  .home-v2-shell { width:calc(100% - 30px); padding-top:40px; }
  .home-v2-copy h1 { font-size:40px; }
  .home-v2-journey { margin-top:42px; padding:28px 0; }
  .home-v2-journey-heading h2 { font-size:20px; }
  .home-v2-journey-rail { grid-template-columns:1fr; gap:5px; }
  .home-v2-journey-rail > i { display:none; }
  .home-v2-journey-rail button { padding:8px 0; }
}

/* Rewrite dark-mode polish: keep the light palette unchanged. */
body:not(.light-theme) .rewrite-page #originalText {
  border-color:rgba(167,219,216,.18) !important;
  background:rgba(105,210,231,.025) !important;
  color:#f1f6ed !important;
}
body:not(.light-theme) .rewrite-page #rewriteContent {
  border-color:rgba(105,210,231,.20) !important;
  background:rgba(105,210,231,.045) !important;
  color:#f1f6ed !important;
}
body:not(.light-theme) .rewrite-page #originalText::placeholder,
body:not(.light-theme) .rewrite-page .rewrite-placeholder,
body:not(.light-theme) .rewrite-page .rewrite-muted {
  color:#92b2b5 !important;
}
body:not(.light-theme) .rewrite-page #rewriteVersionTabs {
  border-color:rgba(167,219,216,.18) !important;
  background:#102d42 !important;
}
body:not(.light-theme) .rewrite-page #rewriteVersionTabs button:not(.is-active) {
  background:transparent !important;
  color:#92b2b5 !important;
  box-shadow:none !important;
}
body:not(.light-theme) .rewrite-page #rewriteVersionTabs button:hover:not(.is-active) {
  background:rgba(105,210,231,.09) !important;
  color:#f1f6ed !important;
}
body:not(.light-theme) .rewrite-page #rewriteVersionTabs button.is-active {
  border-color:#69d2e7 !important;
  background:#69d2e7 !important;
  color:#112b46 !important;
  box-shadow:none !important;
}
body:not(.light-theme) .rewrite-page .rewrite-cost-panel {
  background:#102d42 !important;
}
body:not(.light-theme) .rewrite-page .rewrite-copy-btn {
  border-color:rgba(105,210,231,.22) !important;
  background:rgba(105,210,231,.08) !important;
  color:#a7dbd8 !important;
}
body:not(.light-theme) .rewrite-page .rewrite-copy-btn:disabled {
  opacity:.5;
  cursor:not-allowed;
}
body:not(.light-theme) .rewrite-page .rewrite-clear-btn {
  border:1px solid rgba(248,113,113,.18) !important;
  background:rgba(239,68,68,.07) !important;
  color:#fda4af !important;
}
body:not(.light-theme) .rewrite-page .rewrite-clear-btn:hover {
  border-color:rgba(248,113,113,.30) !important;
  background:rgba(239,68,68,.12) !important;
  box-shadow:none !important;
}
body:not(.light-theme) .rewrite-page .doc-rewrite-entry-btn {
  border-color:rgba(105,210,231,.25) !important;
  background:rgba(105,210,231,.08) !important;
  color:#c4dad7 !important;
}
body:not(.light-theme) .rewrite-page .rewrite-recharge-link {
  background:rgba(243,134,48,.09) !important;
}
body:not(.light-theme) .rewrite-page #progressText {
  color:#69d2e7 !important;
}
body:not(.light-theme) .rewrite-page .rewrite-ai-commitment {
  border-color:rgba(167,219,216,.16);
  background:rgba(167,219,216,.045);
  color:#92b2b5;
}
body:not(.light-theme) .rewrite-page .rewrite-ai-commitment > i {
  color:#69d2e7;
}

/* Three creation workspaces. */
.wrt-workspace-switch {
  grid-template-columns:repeat(3,minmax(0,1fr));
  width:min(100%,520px);
}
.wrt-workspace-empty {
  display:grid;
  justify-items:center;
  gap:8px;
  min-height:320px;
  margin-top:24px;
  padding:72px 24px;
  border:1px solid var(--ui-border);
  border-radius:20px;
  background:var(--ui-surface);
  color:var(--ui-text-muted);
  text-align:center;
}
.wrt-workspace-empty > i {
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:14px;
  background:rgba(105,210,231,.12);
  color:var(--ocean-cyan);
  font-size:19px;
}
.wrt-workspace-empty h2 { margin:8px 0 0; color:var(--ui-text); font-size:20px; }
.wrt-workspace-empty p { margin:0; font-size:13px; }
@media (max-width:700px) {
  .wrt-workspace-switch { grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  .wrt-workspace-tab { gap:5px; padding-right:6px; padding-left:6px; }
  .wrt-workspace-tab strong { font-size:12px; }
  .wrt-workspace-icon { display:none; }
}

/* Fresh light social composer surface. */
body.light-theme #socialInput.social-textarea {
  border-color:#a9dce5 !important;
  background:#f0fbfd !important;
  color:#214b59 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.86) !important;
}
body.light-theme #socialInput.social-textarea::placeholder {
  color:#607f89 !important;
  opacity:1 !important;
}
body.light-theme #socialInput.social-textarea:hover {
  border-color:#83ccd9 !important;
  background:#ebf9fc !important;
}
body.light-theme #socialInput.social-textarea:focus {
  border-color:#54bfd4 !important;
  background:#f7fdfe !important;
  box-shadow:0 0 0 3px rgba(84,191,212,.16),inset 0 1px 0 rgba(255,255,255,.9) !important;
}
