/* ═══ TOKENS — Linear System ══════════════════════════ */
:root {
  /* Text */
  --ink:       #f7f8f8;
  --ink-2:     #e2e4e7;
  --ink-3:     #8a8f98;
  --ink-4:     #62666d;
  --ink-5:     #3e3e44;
  --muted:     #8a8f98;
  /* Surfaces */
  --bg:        #0a0b0d;
  --bg-warm:   #111318;
  /* Warm accent for celebrations */
  --warm:      #f59e0b;
  --warm-l:    rgba(245,158,11,0.12);
  --surface:   rgba(255,255,255,0.03);
  --border:    rgba(255,255,255,0.08);
  --border-h:  rgba(255,255,255,0.14);
  /* Accent — Linear indigo-violet */
  --accent:      #7170ff;
  --accent-bg:   #5e6ad2;
  --accent-d:    #4a5bc0;
  --blue:      #7170ff;
  --blue-dark: #5e6ad2;
  --blue-l:    rgba(113,112,255,0.12);
  /* Status */
  --green:     #4ade80;
  --green-l:   rgba(74,222,128,0.12);
  --red:       #f87171;
  --red-l:     rgba(248,113,113,0.12);
  --amber:     #fbbf24;
  --amber-l:   rgba(251,191,36,0.12);
  --radius:    8px;
  --shadow-s:  rgba(0,0,0,0.5) 0px 0px 0px 1px, rgba(0,0,0,0.2) 0px 1px 3px;
  --shadow:    rgba(0,0,0,0.6) 0px 0px 0px 1px, rgba(0,0,0,0.3) 0px 4px 12px;
  --shadow-warm: rgba(0,0,0,0.5) 0px 4px 16px, rgba(0,0,0,0.4) 0px 0px 0px 1px;
  --inset-border: rgba(255,255,255,0.04) 0px 0px 0px 0.5px inset;
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ═══ NAV ══════════════════════════════ */
.nav {
  background: var(--bg-warm);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 56px);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  margin-right: 32px;
  flex-shrink: 0;
}
.logo-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.logo-sep {
  color: var(--ink-5);
  margin: 0 4px;
}
.logo-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-4);
}

.nav-tools {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.nav-tools::-webkit-scrollbar { display: none; }
.nav-tool {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s;
  border-bottom: 1.5px solid transparent;
}
.nav-tool:hover:not(.disabled) { color: var(--ink-2); }
.nav-tool.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.nav-tool.disabled {
  opacity: 0.3;
  cursor: default;
}
.nav-soon {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.05);
  color: var(--ink-4);
  padding: 1px 5px;
  border-radius: 3px;
}

.nav-right {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-5);
  flex-shrink: 0;
}

/* ═══ TOOL HEADER ══════════════════════ */
.tool-hd {
  background: var(--bg-warm);
  background: var(--bg-warm),
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(113,112,255,0.04) 0%, transparent 70%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 32px clamp(20px, 5vw, 56px) 28px;
}
.tool-hd::before, .tool-hd::after { display: none; }
.tool-hd-fade { display: none; }
.tool-hd-top {
  padding-left: 0;
  border-left: none;
}
.tool-kicker {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.tool-title {
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-top: 0;
}
.tool-title em {
  font-style: normal;
  color: var(--accent);
}
.tool-desc {
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 9px;
  line-height: 1.6;
  font-weight: 400;
  max-width: 440px;
}

/* ═══ WORKSPACE ════════════════════════ */
.workspace {
  padding: 20px clamp(20px, 5vw, 56px) 64px;
  background: var(--bg);
  max-width: 1280px;
  margin: 0 auto;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(420px, 560px) 1fr;
  gap: 16px;
  align-items: stretch;
}
.two-col > .panel {
  height: 100%;
}
.two-col > * { min-width: 0; }

/* ═══ PANEL ════════════════════════════ */
.panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.panel:hover {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.panel-hd {
  padding: 13px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
}
.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.5px;
}
.panel-sub {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 2px;
}
.panel-bd {
  padding: 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ═══ FORM ══════════════════════════════ */
.field { margin-bottom: 15px; }
.field.error input,
.field.error textarea,
.field.error select { border-color: var(--red) !important; box-shadow: 0 0 0 2px rgba(248,113,113,0.15); }
.field-error-msg {
  margin-top: 4px;
  font-size: 12px;
  color: var(--red);
  display: none;
}
.field.error .field-error-msg { display: block; }
.f-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.f-req { color: var(--red); margin-left: 2px; }
.f-hint {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 5px;
  line-height: 1.5;
}
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.05);
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  outline: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  transition: box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 80px; }
textarea::-webkit-scrollbar { width: 4px; }
textarea::-webkit-scrollbar-track { background: transparent; }
textarea::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
textarea::-webkit-resizer { display: none; }
input:hover, select:hover, textarea:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14);
}
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 1.5px rgba(113,112,255,0.6), 0 0 0 4px rgba(113,112,255,0.1);
  background: rgba(255,255,255,0.07);
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
select option { background: #191a1b; color: var(--ink); }

.gen-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--accent-bg);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: rgba(94,106,210,0.4) 0px 1px 0px inset, rgba(0,0,0,0.35) 0px 4px 10px;
  margin-top: 18px;
}
.gen-btn:hover { background: #6979e0; box-shadow: rgba(94,106,210,0.4) 0px 1px 0px inset, rgba(0,0,0,0.45) 0px 6px 14px; }
.gen-btn:active { transform: scale(0.985); background: var(--accent-d); }
.gen-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; animation: breathe 2s ease-in-out infinite; }
.gen-btn .spinner { width: 16px; height: 16px; }
@keyframes breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.55; } }

.err-box {
  margin-top: 8px;
  padding: 8px 11px;
  background: var(--red-l);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 6px;
  font-size: 12px;
  color: var(--red);
  display: none;
}

/* ═══ RESULTS ══════════════════════════ */
.empty-state {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 32px 16px;
}
.empty-steps {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.empty-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 88px;
  flex-shrink: 0;
}
.empty-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(113,112,255,0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.empty-step-text {
  font-size: 12px;
  color: var(--ink-4);
  width: 100%;
  text-align: center;
  line-height: 1.4;
}
.empty-step-arrow {
  font-size: 14px;
  color: var(--ink-5);
  margin-top: 9px;
  flex-shrink: 0;
}
.empty-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.empty-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-4);
}
.empty-hint {
  font-size: 12px;
  color: var(--ink-5);
  max-width: 210px;
  line-height: 1.5;
}

.result-block {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
  background: rgba(255,255,255,0.02);
}
.result-block:hover {
  border-color: rgba(255,255,255,0.1);
}
.result-block.copy-flash {
  animation: copyGlow 0.4s ease-out;
}
@keyframes copyGlow {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
  30%  { box-shadow: 0 0 0 2px rgba(74,222,128,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.result-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 13px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.result-left  { display: flex; align-items: center; gap: 8px; }
.result-right { display: flex; align-items: center; gap: 6px; }

.r-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-4);
}
.r-scheme {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
}
.scheme-a { background: rgba(74,222,128,0.12); color: #4ade80; }
.scheme-b { background: rgba(113,112,255,0.12); color: #7170ff; }
.result-block:has(.scheme-a) { border-left: 2px solid rgba(74,222,128,0.35); }
.result-block:has(.scheme-b) { border-left: 2px solid rgba(113,112,255,0.2); }

.char-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}
.pill-ok   { background: rgba(34,197,94,0.15);  color: #22c55e; }
.pill-warn { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.pill-over { background: rgba(239,68,68,0.15);   color: #ef4444; }

.cp-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.13s;
  min-height: 32px;
  min-width: 44px;
}
.cp-btn:hover { background: rgba(255,255,255,0.08); color: var(--ink-2); border-color: rgba(255,255,255,0.16); }
.cp-btn.copied { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.3); color: #4ade80; }

.result-body { padding: 11px 13px; }
.result-text {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  word-break: break-all;
}
.result-text.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}

.bar-rail {
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.25,1,0.5,1);
}
.fill-ok   { background: #4ade80; }
.fill-warn { background: #fbbf24; }
.fill-over { background: #f87171; }

.result-note {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  line-height: 1.5;
}

.regen-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.13s;
  display: none;
}
.regen-btn:hover { background: rgba(255,255,255,0.07); color: var(--ink-2); border-color: rgba(255,255,255,0.16); }

/* ═══ EVENT PLATFORM TABS ═════════════ */
.ev-pt-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ev-pt-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  transition: color 0.13s, border-color 0.13s;
}
.ev-pt-tab:hover { color: var(--ink-2); }
.ev-pt-tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.ev-pt-icon { font-size: 14px; }

.ev-panel { animation: fadeUp 0.2s ease both; }

.ev-backend-hint {
  font-size: 12px;
  color: var(--ink-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 7px 11px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.ev-field-limit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-4);
}
.ev-copy-all-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: var(--accent-bg);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-feature-settings: 'cv01', 'ss03';
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: rgba(94,106,210,0.35) 0px 1px 0px inset, rgba(0,0,0,0.3) 0px 4px 8px;
}
.ev-copy-all-btn:hover { background: #6979e0; }
.ev-copy-all-btn.copied { background: rgba(74,222,128,0.15); color: #4ade80; box-shadow: none; border: 1px solid rgba(74,222,128,0.25); }

/* ═══ FOOTER ══════════════════════════ */
footer {
  padding: 18px clamp(20px, 5vw, 56px);
  font-size: 12px;
  color: var(--ink-4);
  border-top: 1px solid rgba(255,255,255,0.05);
  letter-spacing: 0.1px;
  background: var(--bg-warm);
}

/* ═══ UTILS ═══════════════════════════ */
.hidden { display: none !important; }
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadeUp 0.3s ease-out both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ FOCUS & A11Y ════════════════════ */
.nav-tool:focus-visible,
.logo:focus-visible,
.cp-btn:focus-visible,
.gen-btn:focus-visible,
.regen-btn:focus-visible,
.ev-pt-tab:focus-visible,
.ev-copy-all-btn:focus-visible,
.nom-platform-hd:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:focus, select:focus, textarea:focus { outline: none; }

/* ═══ TOAST ═══════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--ink-2);
  z-index: 2000;
  animation: toastIn 0.3s ease-out, toastOut 0.2s ease-in 3.2s forwards;
  box-shadow: var(--shadow);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(-8px); } }

/* ═══ AUTH MODAL ══════════════════════ */
.auth-btn-outline {
  background: none;
  border: 1px solid var(--border-h);
  color: var(--ink-3);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-btn-outline:hover { color: var(--ink-2); border-color: rgba(255,255,255,0.2); }
.auth-btn-primary {
  background: var(--accent-bg);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-btn-primary:hover { background: #6979e0; }

/* ═══ REDUCED MOTION ══════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══ RESPONSIVE ════════════════════════ */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .logo-sub, .logo-sep { display: none; }
}
@media (max-width: 768px) {
  .tool-title { font-size: 26px; letter-spacing: -0.4px; }
}
@media (max-width: 600px) {
  .tool-title { font-size: 24px; letter-spacing: -0.3px; }
  .nav-tool { padding: 0 10px; font-size: 14px; }
  .workspace { padding: 14px 16px 40px; }
  .tool-hd { padding: 24px 16px 20px; }
}
@media (max-width: 420px) {
  .nav { padding: 0 14px; }
  .logo { margin-right: 16px; }
  .nav-tool .nav-soon { display: none; }
}
@media (max-width: 480px) {
  .result-hd { flex-direction: column; align-items: flex-start; gap: 6px; }
  .result-right { width: 100%; justify-content: flex-end; }
  .market-option { gap: 6px; padding: 8px 10px; }
  .market-option-lang { display: none; }
  .panel-hd { padding: 10px 14px; }
  .panel-bd { padding: 14px; }
  .global-step-bd { padding: 14px; }
  .empty-step { width: 72px; }
  .empty-step-text { font-size: 10px; }
  .ev-field-limit { display: none; }
}

/* ═══ NOMINATION SUBMIT SECTION ════════ */
.nom-submit-section {
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}
.nom-submit-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
/* 推荐申请 — 平台选择器 */
.nom-platform-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.nom-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-3);
  transition: all 0.15s;
  user-select: none;
}
.nom-platform-chip:has(input:checked) {
  border-color: var(--accent);
  background: rgba(113,112,255,0.1);
  color: var(--ink);
}
.nom-platform-chip input { display: none; }

/* Date range row */
.date-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-range-row input[type="date"] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
.date-range-row input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}
.date-range-sep {
  color: var(--ink-4);
  font-size: 13px;
  flex-shrink: 0;
}

/* Input with inline counter */
.input-with-counter {
  position: relative;
}
.input-with-counter input {
  width: 100%;
  padding-right: 50px;
}
.input-counter {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--ink-4);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.input-counter.warn { color: var(--amber); }
.input-counter.over { color: var(--red); }
.nom-platform {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px;
  margin-bottom: 6px;
  overflow: hidden;
}
.nom-platform-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  transition: background 0.13s;
  user-select: none;
}
.nom-platform-hd:hover { background: rgba(255,255,255,0.04); }
.nom-platform-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.nom-platform-path {
  font-size: 12px;
  color: var(--ink-4);
  flex: 1;
}
.nom-toggle-icon {
  font-size: 11px;
  color: var(--ink-5);
  transition: transform 0.15s;
}
.nom-toggle-icon.open { transform: rotate(90deg); }
.nom-platform-body {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.01);
}
.nom-template { margin-bottom: 10px; }
.nom-template-label {
  font-size: 12px;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nom-template-text {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: pre-wrap;
  line-height: 1.7;
  font-family: 'JetBrains Mono', monospace;
}
.nom-backend-path {
  font-size: 12px;
  color: var(--ink-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  line-height: 1.6;
}
.nom-note {
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.6;
}
.nom-download-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.nom-download-link:hover { text-decoration: underline; }
.cp-sm { font-size: 12px; padding: 2px 8px; height: auto; }

/* ═══ GLOBAL LAUNCH CENTER ═══════════════════════════ */
.global-wizard { display: flex; flex-direction: column; gap: 16px; }
.global-step { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; transition: max-height 0.4s ease, opacity 0.35s ease, margin 0.35s ease, padding 0.35s ease, border-width 0.35s ease; max-height: 2000px; opacity: 1; overflow: hidden; }
.global-step.collapsed { max-height: 0; opacity: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
.global-step-hd { padding: 13px 20px; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 10px; border-radius: 10px 10px 0 0; cursor: pointer; user-select: none; transition: background 0.15s; }
.global-step-hd:hover { background: rgba(255,255,255,0.04); }
.global-step-bd { padding: 20px; border-radius: 0 0 10px 10px; transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease; max-height: 2000px; opacity: 1; overflow: hidden; }
.global-step-bd.collapsed { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
.global-step-num { width: 28px; height: 28px; border-radius: 50%; background: rgba(113,112,255,0.15); color: var(--accent); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.global-step-title { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.lang-preset-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lang-preset-btn { font-size: 12px; font-weight: 500; padding: 5px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 6px; color: var(--ink-3); cursor: pointer; transition: all 0.15s; }
.lang-preset-btn:hover { background: rgba(255,255,255,0.08); color: var(--ink-2); border-color: var(--border-h); }
.market-dropdown { position: relative; }
.market-dropdown-trigger {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: rgba(255,255,255,0.05); cursor: pointer; font-size: 14px;
  color: var(--ink-2); transition: all 0.15s;
}
.market-dropdown-trigger:hover { border-color: var(--border-h); background: rgba(255,255,255,0.07); }
.market-dropdown-trigger.active { border-color: var(--accent); }
.market-dropdown-trigger-arrow { color: var(--ink-4); font-size: 10px; transition: transform 0.15s; }
.market-dropdown-trigger.active .market-dropdown-trigger-arrow { transform: rotate(180deg); }
.market-dropdown-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-warm); border: 1px solid var(--border); border-radius: 8px;
  max-height: 240px; overflow-y: auto; z-index: 20;
  display: none; box-shadow: var(--shadow);
}
.market-dropdown-panel.open { display: block; }
.market-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.market-option:last-child { border-bottom: none; }
.market-option:hover { background: rgba(255,255,255,0.04); }
.market-option:has(input:checked) { background: rgba(113,112,255,0.10); }
.market-option:has(input:checked) .market-option-name { color: var(--ink); }
.market-option:has(input:checked) .market-option-code { background: rgba(113,112,255,0.20); color: var(--accent); }
.market-option input { width: auto; accent-color: var(--accent); cursor: pointer; }
.market-option-code { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; padding: 2px 5px; border-radius: 3px; background: rgba(255,255,255,0.06); color: var(--ink-4); flex-shrink: 0; }
.market-option-name { font-size: 14px; color: var(--ink-2); }
.market-option-lang { font-size: 12px; color: var(--ink-4); margin-left: auto; }
.depth-options { display: flex; flex-direction: column; gap: 8px; }
.depth-chip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: all 0.15s; background: rgba(255,255,255,0.02); min-height: 56px; }
.depth-chip:hover { border-color: var(--border-h); background: rgba(255,255,255,0.04); }
.depth-chip.selected { border-color: var(--accent); background: rgba(113,112,255,0.10); box-shadow: 0 0 0 1px rgba(113,112,255,0.15), 0 2px 8px rgba(0,0,0,0.2); }
.depth-chip input { width: auto; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.depth-name { font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1.4; }
.depth-desc { font-size: 12px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.global-gen-btn { margin-top: 16px; }
/* 市场维度视图 */
.global-results { padding-top: 8px; }
.market-tab-bar { display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; position: relative; box-shadow: inset -24px 0 16px -16px rgba(0,0,0,0.35); }
.market-tab-bar::-webkit-scrollbar { display: none; }
.market-tab { padding: 12px 20px; font-size: 14px; font-weight: 500; color: var(--ink-4); cursor: pointer; border: none; background: none; border-bottom: 1.5px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; white-space: nowrap; min-height: 44px; }
.market-tab:hover { color: var(--ink-2); }
.market-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.market-tab-actions { margin-left: auto; display: flex; align-items: center; padding-right: 8px; }
.market-view { display: none; }
.market-view.active { display: block; }
.market-platform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.market-platform-col { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.market-platform-hd { padding: 12px 16px; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: space-between; }
.market-platform-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 10px; border-radius: 3px; }
.platform-as { background: rgba(74,222,128,0.12); color: var(--green); }
.platform-gp { background: rgba(113,112,255,0.12); color: var(--accent); }
.market-platform-bd { padding: 14px 16px; }
.global-result-section { margin-bottom: 0; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.04); }
.global-result-section:first-child { border-top: none; padding-top: 0; }
.global-result-section:last-child { padding-bottom: 0; }
.global-result-section.truncated { border-left: 2px solid var(--red); padding-left: 12px; margin-left: -14px; }
.global-section-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.global-section-label-group { display: flex; align-items: center; gap: 8px; }
.global-section-label { font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-3); }
.global-section-actions { display: flex; align-items: center; gap: 8px; }
.global-section-hd .cp-btn { opacity: 0; transition: opacity 0.15s; }
.market-platform-col:hover .global-section-hd .cp-btn,
.global-section-hd .cp-btn:focus-visible { opacity: 1; }
.global-section-text { font-size: 14px; color: var(--ink-2); line-height: 1.6; word-break: break-all; white-space: pre-wrap; }
.global-section-text.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.global-notes { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.05); }
.truncated-badge { font-size: 10px; font-weight: 600; color: var(--red); background: rgba(248,113,113,0.12); padding: 1px 6px; border-radius: 3px; }
.short-warning-badge { font-size: 10px; font-weight: 600; color: var(--amber); background: rgba(251,191,36,0.12); padding: 1px 6px; border-radius: 3px; }
.global-result-section.short-warning { border-left: 2px solid var(--amber); padding-left: 12px; margin-left: -14px; }
.foldable-block { margin-top: 10px; }
.foldable-trigger { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-4); cursor: pointer; padding: 6px 0; transition: color 0.15s; }
.foldable-trigger:hover { color: var(--ink-2); }
.foldable-trigger::before { content: '▸'; font-size: 10px; transition: transform 0.15s; }
.foldable-trigger.open::before { transform: rotate(90deg); }
.foldable-content { transform: scaleY(0); transform-origin: top; opacity: 0; max-height: 0; overflow: hidden; transition: transform 0.25s ease-out, opacity 0.2s ease-out; padding-top: 0; }
.foldable-content.open { transform: scaleY(1); opacity: 1; max-height: none; padding-top: 8px; }
.kw-pool-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.global-embedded-kw { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.04); }
.global-kw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.info-tooltip { position: relative; display: inline-flex; align-items: center; margin-left: 6px; cursor: help; }
.info-tooltip .tt-icon { font-size: 12px; color: var(--ink-4); transition: color 0.15s; }
.info-tooltip:hover .tt-icon { color: var(--accent); }
.info-tooltip .tt-content { position: absolute; bottom: 100%; left: 0; transform: none; margin-bottom: 8px; width: 220px; padding: 10px 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; line-height: 1.6; color: var(--ink-2); opacity: 0; visibility: hidden; transition: all 0.15s; z-index: 100; pointer-events: none; }
.info-tooltip:hover .tt-content,
.info-tooltip.tt-active .tt-content { opacity: 1; visibility: visible; pointer-events: auto; }
.info-tooltip .tt-content::after { content: ''; position: absolute; top: 100%; left: 20px; border: 6px solid transparent; border-top-color: rgba(255,255,255,0.05); }
.global-loading { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.progress-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.progress-header-text { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.progress-count { font-size: 12px; color: var(--ink-4); }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.task-tile { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--ink-4); transition: all 0.3s; }
.task-tile.active { border-color: var(--accent); color: var(--accent); background: rgba(113,112,255,0.08); }
.task-tile.done { border-color: rgba(76,217,100,0.3); color: var(--ink-2); background: rgba(76,217,100,0.06); }
.task-tile.error { border-color: rgba(255,69,58,0.3); color: #ff6b6b; }
.task-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ink-5); transition: all 0.3s; }
.task-tile.active .task-dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.task-tile.done .task-dot { background: #4cd964; }
.task-tile.error .task-dot { background: #ff6b6b; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.task-platform-tag { font-size: 10px; padding: 1px 6px; border-radius: 3px; background: rgba(255,255,255,0.06); color: var(--ink-4); flex-shrink: 0; }
.task-tile.done .task-platform-tag { background: rgba(76,217,100,0.1); color: #4cd964; }
.task-tile.active .task-platform-tag { background: rgba(113,112,255,0.12); color: var(--accent); }
.kw-tag { font-size: 12px; padding: 3px 8px; background: rgba(113,112,255,0.12); color: var(--accent); border-radius: 3px; font-family: 'JetBrains Mono', monospace; }
.output-options { display: flex; flex-direction: column; gap: 16px; }
.output-group-title { font-size: 12px; font-weight: 600; color: var(--ink-4); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.output-chip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: all 0.15s; margin-bottom: 8px; min-height: 44px; }
.output-chip:hover { border-color: var(--border-h); }
.output-chip.disabled { opacity: 0.5; cursor: default; }
.output-chip input[type="checkbox"] { appearance: none; width: 14px; height: 14px; border: 1.5px solid var(--ink-4); border-radius: 3px; background: transparent; cursor: pointer; position: relative; flex-shrink: 0; margin: 0; }
.output-chip input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.output-chip input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid white; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.output-chip input[type="checkbox"]:disabled { opacity: 0.4; cursor: default; }
.output-chip span { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.market-select { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.market-chip { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 10px 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: all 0.15s; font-size: 14px; color: var(--ink-2); min-height: 44px; }
.market-chip:hover { border-color: var(--border-h); background: rgba(255,255,255,0.05); color: var(--ink); }
.market-chip input[type="checkbox"] { appearance: none; width: 14px; height: 14px; border: 1.5px solid var(--ink-4); border-radius: 3px; background: transparent; cursor: pointer; position: relative; flex-shrink: 0; margin: 0; }
.market-chip input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.market-chip input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid white; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
@media (max-width: 1100px) {
  .market-platform-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .market-platform-grid { grid-template-columns: 1fr; }
  .market-tab { padding: 10px 14px; font-size: 13px; }
}
