/* 麦角硫因鸡蛋 eggai AI 平台 — 原型设计系统 (PRD §12.3) */
/* V2：对齐现网品牌 —— 主品牌色 eggai 绿 #1CAE34，琥珀金为蛋黄/麦芽点缀色 */
/* TOKENS:START */
:root {
  --brand: #1CAE34;
  --brand-dark: #128A26;
  --brand-deep: #147A38;
  --brand-bright: #1DB954;
  --brand-soft: #E3F5E7;
  --gold: #E7A929;
  --gold-dark: #B07F24;
  --gold-ink: #8F6018;
  --gold-mid: #D08E22;
  --gold-soft: #F8EFD4;
  --jade: #0F9373;
  --jade-deep: #0C7C64;
  --jade-soft: #DDF4EE;
  --green: #14301F;
  --green-mid: #1E4630;
  --bg: #FAF7F0;
  --card: #FFFFFF;
  --ink: #23281F;
  --ink-2: #5A6152;
  --ink-3: #8A968E;
  --line: #E8E2D2;
  --ok: #0E9F6E;
  --warn: #D97706;
  --danger: #C2331F;
  --info: #2B5FAB;
  --ok-soft: #E5F5EB;
  --danger-soft: #F9E6E3;
  --info-soft: #E4EBF7;
  --neutral-soft: #EFEDE6;
  --shadow-ink: #1F3D2B;
  --shimmer-base: #ECE9E0;
  --shimmer-highlight: #F8F6F0;
  --gold-deep-text: #3A2E08;
  --gold-ink-soft: #6B5A2A;
  --gold-muted: #8A8168;
  --sand-muted: #C9BFA2;
  --gold-line: #E8D2A8;
  --danger-line: #E8B4AE;
  --brand-line: #B8D9C4;
  --green-hairline: #B9DCC4;
  --cinema-bg-0: #050F0A;
  --cinema-bg-1: #071A10;
  --cinema-bg-2: #0E3A22;
  --cinema-panel: #1B4A2E;
  --cinema-band-2: #155E33;
  --cinema-edge: #20241E;
  --cinema-gold: #F5C445;
  --cinema-green: #4ADE80;
  --cinema-green-soft: #8FD8A2;
  --cinema-green-pale: #9FD8AE;
  --cinema-green-muted: #7BA78A;
  --cinema-green-dim: #6FA883;
  --cinema-on-soft: #D8EFE0;
  --cinema-on-dim: #C4DECB;
  --cinema-on-muted: #8FB39B;
  --cinema-red: #F87171;
  --brand-mint: #7EE89A;
  --danger-light: #FF9D8A;
  --app-ink: #122018;
  --app-muted: #5E6F63;
  --app-line: #E6EBE6;
  --app-bg: #F3F6F2;
  --app-card2: #F7FAF7;
  --app-ok-tx: #16A34A;
  --app-warn-tx: #D4A017;
  --app-gray-bg: #EEF1EE;
  --radius: 14px;
  --radius-chip: 9px;
  --radius-sheet: 20px;
  --radius-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 32px;
  --motion-fast: 120ms; --motion-base: 200ms; --motion-slow: 320ms; --motion-nav: 260ms; --motion-shimmer: 1200ms;
  --type-hero: 28px;
  --type-title: 20px;
  --type-section: 17px;
  --type-body: 15px;
  --type-small: 13px;
  --type-caption: 11.5px;
  --shadow: 0 2px 10px rgba(31, 61, 43, .07), 0 8px 28px rgba(31, 61, 43, .06);
  --shadow-e1: 0 1px 3px rgba(31, 61, 43, .08);
  --shadow-e2: 0 2px 10px rgba(31, 61, 43, .07), 0 8px 28px rgba(31, 61, 43, .06);
  --shadow-e3: 0 8px 24px rgba(31, 61, 43, .12);
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}
/* TOKENS:END */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body {
  font-family: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65;
}
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ===== 布局壳 ===== */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: #FFFFFF; color: var(--ink); padding: 22px 14px; position: sticky; top: 0; height: 100vh; flex-shrink: 0; border-right: 1px solid var(--line); }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.sidebar .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.sidebar .brand .logo-img { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #fff; flex-shrink: 0; }
.sidebar .brand b { font-size: 16px; letter-spacing: .5px; }
.sidebar .brand small { display: block; color: var(--ink-2); font-size: 11px; font-weight: 400; }
.sidebar .nav-group { font-size: 11px; color: var(--ink-3); margin: 16px 10px 6px; letter-spacing: 1px; }
.sidebar .nav-group-block { border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.sidebar .nav-group-block:last-child { border-bottom: 0; }
.sidebar a { display: flex; align-items: center; gap: 9px; color: var(--ink-2); text-decoration: none; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; margin-bottom: 2px; }
.sidebar a:hover { background: var(--neutral-soft); color: var(--ink); }
.sidebar a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.sidebar a .ico { width: 18px; text-align: center; }
.sidebar a .ic { width: 17px; height: 17px; flex-shrink: 0; color: var(--ink-3); }
.sidebar a:hover .ic { color: var(--ink-2); }
.sidebar a.active .ic { color: var(--brand-dark); }
.logo-pill { background: #fff; border-radius: 10px; padding: 6px 10px; display: inline-flex; align-items: center; }
.logo-pill img { height: 30px; display: block; }
.main { flex: 1; padding: 26px 34px 60px; max-width: 1240px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.topbar h1 { font-size: 21px; display: flex; align-items: center; gap: 9px; }
.topbar h1 .ic { width: 22px; height: 22px; color: var(--brand-dark); }
.topbar .crumb { color: var(--ink-2); font-size: 12.5px; margin-bottom: 3px; }
.user-chip { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 7px; font-size: 13px; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--green-mid); color: #fff; display: grid; place-items: center; font-size: 12px; }

/* ===== 组件 ===== */
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3,1fr); } .grid.c4 { grid-template-columns: repeat(4,1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .sub { font-weight: 400; color: var(--ink-2); font-size: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-family: var(--mono); font-size: 27px; font-weight: 700; color: var(--green); }
.kpi .v em { font-style: normal; font-size: 13px; color: var(--ink-2); font-weight: 400; margin-left: 4px; }
.kpi .l { font-size: 12.5px; color: var(--ink-2); }
.kpi .trend { font-size: 12px; } .kpi .trend.up { color: var(--ok); } .kpi .trend.down { color: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.badge.ok { background: #E5F5EB; color: var(--ok); }
.badge.warn { background: var(--gold-soft); color: var(--warn); }
.badge.danger { background: #F9E6E3; color: var(--danger); }
.badge.info { background: #E4EBF7; color: var(--info); }
.badge.gold { background: var(--gold-soft); color: var(--gold-dark); }
.badge.gray { background: #EFEDE6; color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.btn { display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; font-size: 13.5px; font-weight: 600; padding: 9px 18px; border-radius: 10px; text-decoration: none; transition: .15s; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.gold { background: var(--gold); color: var(--gold-deep-text); }
.btn.gold:hover { background: var(--gold-dark); color: #fff; }
.btn.dark { background: var(--green); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.disabled, .btn:disabled { background: #EFEDE6; color: var(--ink-3); cursor: not-allowed; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }

table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th { text-align: left; color: var(--ink-2); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tb td { padding: 10px; border-bottom: 1px solid var(--neutral-soft); vertical-align: middle; }
.tb tr:hover td { background: var(--bg); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; background: var(--card); font-family: inherit; }
.field input:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }

/* 时间轴（追溯链） */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2.5px solid var(--bg); box-shadow: 0 0 0 2px var(--gold); }
.tl-item.done::before { background: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.tl-item.alert::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.tl-item .t { font-weight: 600; font-size: 14px; }
.tl-item .d { color: var(--ink-2); font-size: 12.5px; }

/* 护照/证书 */
.passport { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 22px; position: relative; box-shadow: var(--shadow); }
.passport a { color: var(--brand-dark); text-decoration: none; border-bottom: 1px dashed rgba(28,174,52,.4); }
.passport a:hover { color: var(--brand); border-bottom-style: solid; }
.hash-chip { font-family: var(--mono); font-size: 11.5px; background: var(--neutral-soft); color: var(--ink-2); padding: 5px 11px; border-radius: 7px; word-break: break-all; }

/* AI 卡片 */
.ai-card { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.ai-card .ai-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--gold-dark); background: var(--gold-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.ai-card .ai-tag::before { content: "✦"; }
.review-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--warn); background: var(--gold-soft); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.review-chip::before { content: "👤"; }
.review-chip.confirmed { color: var(--ok); background: #E5F5EB; }
.review-chip.confirmed::before { content: "✓"; }

/* 图片占位 */
.ph { background: repeating-linear-gradient(45deg, var(--neutral-soft), var(--neutral-soft) 12px, var(--line) 12px, var(--line) 24px); border: 1px dashed var(--sand-muted); border-radius: 10px; display: grid; place-items: center; color: var(--gold-muted); font-size: 12px; text-align: center; padding: 10px; min-height: 110px; }

.notice { border-left: 4px solid var(--gold); background: var(--gold-soft); padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: 13px; color: var(--gold-ink-soft); margin-bottom: 18px; }
.notice.red { border-color: var(--danger); background: #F9E6E3; color: #C2331F; }
.section-title { font-size: 17px; font-weight: 700; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 5px; height: 18px; background: var(--gold); border-radius: 3px; }
.muted { color: var(--ink-2); font-size: 12.5px; }
.flex { display: flex; gap: 12px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.inventory-overview { border: 1.5px solid rgba(28,174,52,.22); background: linear-gradient(145deg,#fff,var(--bg)); }
.inventory-overview h3 { font-size: 16px; }
.inventory-overview .inv-cell { padding: 10px 6px 12px; }
.inventory-overview .inv-cell .icbox { width: 34px; height: 34px; border-radius: 11px; margin-bottom: 5px; font-size: 13px; font-weight: 800; }
.inventory-overview .inv-cell b { display: block; margin-top: 4px; color: var(--green); font-size: 14px; }
.bar > i.ok { background: var(--ok); } .bar > i.bad { background: var(--danger); }

/* 工作台顶条（ops.js barHtml）与告警链接 */
.opsbar { padding: 10px 16px; margin-bottom: 14px; box-shadow: none; }
.opsbar select, .opsbar input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: var(--card); font-family: inherit; }
.alerts a { color: var(--brand-dark); text-decoration: none; border-bottom: 1px dashed rgba(28,174,52,.4); }
.alerts a:hover { color: var(--brand); border-bottom-style: solid; }
.tb a:not(.btn) { color: var(--brand-dark); text-decoration: none; border-bottom: 1px dashed rgba(28,174,52,.35); }
.tb a:not(.btn):hover { color: var(--brand); border-bottom-style: solid; }

/* ===== 暗色科技大屏（产业指挥中心 / 视频开场） ===== */
.dark-stage { background: radial-gradient(1200px 600px at 70% -10%, var(--cinema-bg-2) 0%, var(--cinema-bg-1) 55%, var(--cinema-bg-0) 100%); color: var(--cinema-on-soft); min-height: 100vh; }
.dark-stage .d-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; border-bottom: 1px solid rgba(28,174,52,.25); }
.dark-stage .d-title { font-family: "PingFang SC", "Source Han Sans SC", "Noto Sans CJK SC", "Noto Sans CJK HK", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--brand-soft); text-shadow: 0 0 18px rgba(28,174,52,.45); }
.d-panel { background: linear-gradient(160deg, rgba(20,48,31,.85), rgba(7,26,16,.9)); border: 1px solid rgba(28,174,52,.35); border-radius: 12px; padding: 16px; box-shadow: inset 0 0 24px rgba(28,174,52,.06), 0 4px 18px rgba(0,0,0,.35); }
.d-panel h4 { font-size: 13px; color: var(--cinema-green-soft); letter-spacing: 1px; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.d-panel h4::before { content: ""; width: 7px; height: 7px; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.d-kpi .v { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--cinema-green); text-shadow: 0 0 14px rgba(74,222,128,.5); }
.d-kpi .v em { font-size: 12px; color: var(--cinema-green-muted); font-style: normal; }
.d-kpi .l { font-size: 12px; color: var(--cinema-on-muted); }
.d-gold { color: var(--cinema-gold) !important; text-shadow: 0 0 14px rgba(231,169,41,.55) !important; }
.d-line { border-color: rgba(28,174,52,.2) !important; }
.d-tag { font-size: 11px; color: var(--cinema-green-dim); border: 1px solid rgba(28,174,52,.3); border-radius: 5px; padding: 1px 7px; }
.d-scroll { font-size: 12.5px; color: var(--green-hairline); }
.d-scroll .t { color: var(--cinema-green-dim); font-family: var(--mono); margin-right: 8px; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cinema-green); box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
.pulse-dot.red { background: var(--cinema-red); box-shadow: 0 0 0 0 rgba(248,113,113,.6); }
.pulse-dot.amber { background: var(--cinema-gold); box-shadow: 0 0 0 0 rgba(245,196,69,.6); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55);} 70% { box-shadow: 0 0 0 10px rgba(74,222,128,0);} 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0);} }
@keyframes ticker { 0% { transform: translateY(0);} 100% { transform: translateY(-50%);} }
.ticker-wrap { overflow: hidden; } .ticker-inner { animation: ticker 18s linear infinite; }
@keyframes scan { 0% { transform: translateX(-100%);} 100% { transform: translateX(220%);} }
.ai-scan { position: relative; overflow: hidden; }
.ai-scan::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(74,222,128,.18), transparent); animation: scan 2.4s ease-in-out infinite; }

/* ===== 视频表现力组件（V3：每页一个主角） ===== */
.hero-band { background: linear-gradient(120deg, var(--green) 0%, var(--cinema-panel) 60%, var(--cinema-band-2) 100%); border-radius: var(--radius); color: #fff; padding: 22px 26px; margin-bottom: 20px; display: flex; align-items: center; gap: 24px; box-shadow: 0 6px 24px rgba(20,48,31,.25); position: relative; overflow: hidden; }
.hero-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(28,174,52,.35), transparent 70%); }
.hero-band .hb-main { flex: 1; }
.hero-band .hb-kicker { font-size: 12px; color: var(--cinema-green-pale); letter-spacing: 2px; margin-bottom: 6px; }
.hero-band .hb-title { font-size: 22px; font-weight: 800; letter-spacing: .5px; line-height: 1.35; }
.hero-band .hb-title em { font-style: normal; color: var(--cinema-gold); }
.hero-band .hb-sub { font-size: 13px; color: var(--cinema-on-dim); margin-top: 6px; }
.hero-band .hb-num { text-align: center; padding: 0 10px; position: relative; z-index: 1; }
.hero-band .hb-num .v { font-family: var(--mono); font-size: 42px; font-weight: 800; color: var(--cinema-gold); text-shadow: 0 0 18px rgba(245,196,69,.4); line-height: 1.1; }
.hero-band .hb-num .l { font-size: 12px; color: var(--cinema-on-dim); margin-top: 4px; }

/* AI 思考/识别动效 */
.ai-thinking { display: inline-flex; gap: 5px; align-items: center; color: var(--gold-dark); font-size: 12.5px; font-weight: 600; }
.ai-thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: think 1.2s infinite; }
.ai-thinking i:nth-child(2) { animation-delay: .2s; } .ai-thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes think { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.ai-scanbox { position: relative; }
.ai-scanbox::before { content: ""; position: absolute; inset: 6px; border: 2px solid rgba(28,174,52,.8); border-radius: 8px; box-shadow: 0 0 12px rgba(28,174,52,.4), inset 0 0 12px rgba(28,174,52,.15); animation: scanbox 2s ease-in-out infinite; pointer-events: none; }
@keyframes scanbox { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.typewriter { font-family: var(--mono); }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .rv { position: absolute; font-family: var(--mono); font-weight: 800; color: var(--green); }
.big-focus { font-family: var(--mono); font-weight: 800; color: var(--green); }
.flash-good { animation: flashgood 1.6s ease; }
@keyframes flashgood { 0% { box-shadow: 0 0 0 0 rgba(28,174,52,.5); } 100% { box-shadow: 0 0 0 22px rgba(28,174,52,0); } }

/* 移动端框 */
.phone { width: 390px; height: 800px; border: 10px solid var(--cinema-edge); border-radius: 38px; overflow: hidden; background: var(--bg); margin: 0 auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.phone .p-head { background: var(--green); color: #fff; padding: 14px 18px; font-weight: 600; }
.phone .p-body { flex: 1; overflow-y: auto; padding: 14px; }
.phone .p-tab { display: flex; border-top: 1px solid var(--line); background: #fff; }
.phone .p-tab a { flex: 1; text-align: center; padding: 10px 0; font-size: 11px; color: var(--ink-2); text-decoration: none; }
.phone .p-tab a.on { color: var(--gold-dark); font-weight: 700; }

@media (max-width: 900px) { .grid.c2,.grid.c3,.grid.c4 { grid-template-columns: 1fr; } .sidebar { display: none; } .main { padding: 18px; } }

/* ===== 电影模式（?cinema=1）· 宣传片录屏专用 ===== */
body.cinema {
  --cinema-pad-bottom: 96px;
  overflow-x: hidden;
}
body.cinema .sidebar,
body.cinema .topbar,
body.cinema .user-chip,
body.cinema .fs-btn,
body.cinema .demo-tag,
body.cinema .pnav,
body.cinema footer.footer,
body.cinema .muted.mt24,
body.cinema .stage-cap,
body.cinema .d-slogan small,
body.cinema #camModal,
body.cinema #camWallCard,
body.cinema #overlay,
body.cinema #drawer {
  display: none !important;
}
body.cinema .shell { display: block; min-height: 100vh; }
body.cinema .main {
  max-width: none;
  width: 100%;
  padding: 36px 56px var(--cinema-pad-bottom);
  margin: 0 auto;
}
body.cinema .kpi .v,
body.cinema .d-kpi .v,
body.cinema .hb-num .v,
body.cinema .big-focus { font-size: 1.55em; }
body.cinema .hero-band .hb-title { font-size: 28px; }
body.cinema .passport .ergo-big,
body.cinema [data-cinema-focus="passport"] .kpi .v,
body.cinema .passport .kpi .v { font-size: 48px !important; line-height: 1.05; }

/* TODO 占位：素底图标，去掉斜纹与 TODO 字感 */
body.cinema .ph {
  background: linear-gradient(145deg, var(--brand-soft), var(--neutral-soft)) !important;
  border: 1px solid rgba(28,174,52,.22) !important;
  color: transparent !important;
  font-size: 0 !important;
  position: relative;
  min-height: 88px;
}
body.cinema .ph::after {
  content: attr(data-cinema-icon);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--brand-dark);
  opacity: .85;
  letter-spacing: 0;
}
body.cinema .ph:not([data-cinema-icon])::after { content: "◎"; }

/* 焦点高亮：一幕一个主角 */
body.cinema [data-cinema-focus] {
  transition: opacity .35s ease, transform .45s ease, box-shadow .45s ease;
}
body.cinema.cinema-has-focus [data-cinema-focus]:not(.is-focus):not(:has(.is-focus)) {
  opacity: .32;
  filter: saturate(.7);
}
body.cinema [data-cinema-focus].is-focus {
  opacity: 1 !important;
  filter: none !important;
  position: relative;
  z-index: 4;
  transform: scale(1.04);
  box-shadow:
    0 0 0 3px rgba(231,169,41,.85),
    0 0 0 8px rgba(231,169,41,.18),
    0 16px 48px rgba(20,48,31,.22);
  border-radius: 16px;
}
body.cinema .dark-stage [data-cinema-focus].is-focus {
  box-shadow:
    0 0 0 3px rgba(245,196,69,.9),
    0 0 28px rgba(74,222,128,.35),
    0 12px 40px rgba(0,0,0,.45);
}

/* V3 cinema 变量：字号/安全区；电影镜头页优先用 cinema/shot.css，避免与业务原型互相污染 */
body.cinema {
  --cinema-safe: 6%;
  --cinema-type-hero: 48px;
  --cinema-type-caption: 34px;
}
/* 底部大字幕条（与烧录字幕互斥：英雄数字镜勿同时烧字幕） */
.cinema-caption {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: none;
  padding: 22px 48px 28px;
  background: linear-gradient(180deg, transparent, rgba(5,15,10,.82) 38%, rgba(5,15,10,.94));
  text-align: center;
}
body.cinema .cinema-caption { display: block; }
body.cinema.cinema-no-caption .cinema-caption { display: none !important; }
.cinema-caption span {
  display: inline-block;
  max-width: 92%;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.35;
  color: var(--bg);
  text-shadow: 0 2px 18px rgba(0,0,0,.55), 0 0 24px rgba(28,174,52,.35);
}
body.cinema.dark-stage .cinema-caption span,
body.cinema .dark-stage ~ .cinema-caption span { color: var(--brand-soft); }

/* 手机框居中放大 */
body.cinema .phone {
  transform: scale(1.08);
  transform-origin: top center;
  margin-top: 24px;
  margin-bottom: 40px;
}
body.cinema .stage-wrap,
body.cinema #stage { padding-bottom: 0; }

/* ===== V4 · 高品质 SaaS 壳 / AI 闭环 ===== */
:root {
  --ai: #147A38;
  --ai-soft: #E3F5E7;
}
.env-bar {
  position: sticky; top: 0; z-index: 60; text-align: center;
  font-size: 11.5px; letter-spacing: .5px; padding: 5px 12px;
  background: linear-gradient(90deg, #14301F, #1CAE34 40%, #E7A929 70%, #14301F);
  color: #fff; font-weight: 600;
}
.side-tagline {
  padding: 0 10px 14px; color: var(--ink-2); font-size: 11px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px; line-height: 1.5;
}
.side-tagline b { color: var(--ink); font-size: 11.5px; }
.sidebar { display: flex; flex-direction: column; width: 248px; overflow: hidden; }
.side-scroll { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.main { max-width: 1280px; padding-top: 18px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sel-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px 4px 10px; font-size: 12px;
}
.sel-chip .sel-lab { color: var(--ink-2); font-size: 11px; }
.sel-chip select {
  border: none; background: transparent; font-size: 12.5px; font-weight: 600;
  max-width: 148px; outline: none; font-family: inherit; color: var(--ink);
}
.plan-badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-dark); border: 1px solid rgba(231,169,41,.45);
}
.icon-btn {
  position: relative; border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 13px;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn .dot {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
  border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px;
  font-style: normal; display: grid; place-items: center; padding: 0 4px; font-weight: 700;
}
.engine-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -6px 0 18px; padding: 10px 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.engine-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px;
  background: var(--brand-soft); border: 1px solid rgba(28,174,52,.28); border-radius: 999px;
  padding: 5px 12px; white-space: nowrap;
}
.engine-chip b { font-family: var(--mono); color: var(--brand-dark); }
.ec-ai, .ec-human {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
}
.ec-ai { background: var(--ai-soft); color: var(--ai); }
.ec-human { background: var(--gold-soft); color: var(--warn); }
.process-chip { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; font-size: 12px; }
.pc-step {
  text-decoration: none; color: var(--ink-2); padding: 3px 8px; border-radius: 7px;
  border: 1px solid transparent;
}
.pc-step:hover { background: var(--neutral-soft); color: var(--ink); }
.pc-step.on { background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(28,174,52,.35); font-weight: 700; }
.pc-arrow { color: var(--ink-3); font-size: 11px; }
.batch-toggle { display: inline-flex; gap: 4px; margin-left: auto; }
.bt-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  padding: 5px 10px; font-size: 11.5px; cursor: pointer; font-family: var(--mono); font-weight: 600;
}
.bt-btn.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.bt-btn.on.danger { background: var(--danger); border-color: var(--danger); }

.nx-drawer {
  position: fixed; top: 28px; right: 18px; width: 360px; max-height: 70vh;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 48px rgba(20,48,31,.18); z-index: 80; display: flex; flex-direction: column;
}
.nx-drawer[hidden] { display: none !important; }
.nx-drawer-hd { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nx-drawer-bd { overflow-y: auto; padding: 8px; }
.nd-item {
  display: block; text-decoration: none; color: inherit; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; font-size: 12.5px;
}
.nd-item b { display: block; font-size: 13px; margin-bottom: 4px; }
.nd-item span { color: var(--ink-2); font-size: 11.5px; font-family: var(--mono); }
.nd-item.danger { border-color: var(--danger-line); background: var(--danger-soft); }
.nd-item.warn { border-color: var(--gold-line); background: var(--gold-soft); }
.nd-item.ok { border-color: var(--green-hairline); background: var(--brand-soft); }

.nx-cmd {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
  width: min(560px, 92vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.2); z-index: 90; overflow: hidden;
}
.nx-cmd[hidden] { display: none !important; }
.nx-cmd input {
  width: 100%; border: none; border-bottom: 1px solid var(--line);
  padding: 14px 16px; font-size: 15px; outline: none; font-family: inherit;
}
.nx-cmd ul { list-style: none; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; }
.nx-cmd li a {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px;
  text-decoration: none; color: var(--ink); border-radius: 9px; font-size: 13.5px;
}
.nx-cmd li a:hover { background: var(--neutral-soft); }
.nx-cmd em { font-style: normal; font-size: 11px; color: var(--ink-2); background: #EFEDE6; padding: 2px 7px; border-radius: 6px; }

.nx-nba {
  position: fixed; right: 18px; bottom: 18px; width: 320px; z-index: 70;
  background: linear-gradient(160deg, var(--card), var(--gold-soft)); border: 1px solid var(--gold);
  border-radius: 14px; box-shadow: 0 12px 36px rgba(176,127,36,.2); overflow: hidden;
}
.nx-nba.collapsed .nx-nba-bd { display: none; }
.nx-nba-hd { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid rgba(231,169,41,.35); }
.nba-toggle { border: none; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 12px; }
.nx-nba-bd { padding: 8px; }
.nba-item {
  display: block; text-decoration: none; color: var(--ink); font-size: 12.5px;
  padding: 9px 10px; border-radius: 9px; margin-bottom: 4px; line-height: 1.45;
}
.nba-item:hover { background: rgba(231,169,41,.12); }
.nba-eng { color: var(--gold-dark); font-weight: 700; font-size: 11.5px; }

.nx-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--green); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100;
}
.nx-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.nx-toast.warn { background: var(--warn); }
.nx-toast.danger { background: var(--danger); }

.gate-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.gate-why { font-size: 10.5px; font-family: var(--mono); color: var(--danger); }
/* ===== 公共组件规范（G4）：空态 / 骨架 / 表格 / 分页 / 统计 / 趋势 ===== */
.empty-state { text-align: center; padding: 36px 16px; color: var(--ink-2); font-size: 13px; }
.empty-state .es-ico { width: 44px; height: 44px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); }
.empty-state .es-ico .ic { width: 22px; height: 22px; }
.empty-state .es-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.empty-state .es-hint { color: var(--ink-3); }
.empty-state.compact { padding: 20px 12px; }
.skel-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--neutral-soft) 25%, var(--neutral-soft) 50%, var(--neutral-soft) 75%); background-size: 400% 100%; animation: sh 1.2s infinite; margin-bottom: 8px; }
.skel-block { border-radius: 10px; background: linear-gradient(90deg, var(--neutral-soft) 25%, var(--neutral-soft) 50%, var(--neutral-soft) 75%); background-size: 400% 100%; animation: sh 1.2s infinite; }
.skel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
@keyframes sh { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
.tb-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.tb-wrap .tb { width: 100%; }
.tb td.num, .tb th.num, .tb .num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.pager .pg-info { margin-right: auto; color: var(--ink-2); font-size: 12.5px; }
.pager button.pg-num { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.pager button.pg-num:hover { border-color: var(--gold); }
.pager button.pg-num.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pager button.pg-num:disabled { opacity: .45; cursor: not-allowed; }
.stat { display: flex; align-items: baseline; gap: 6px; }
.stat .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 22px; color: var(--ink); }
.stat .u { font-size: 12px; color: var(--ink-2); }
.stat.trend-up .v { color: var(--ok); }
.stat.trend-down .v { color: var(--danger); }
.trend-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.trend-chip.up { color: var(--ok); background: #E5F5EB; }
.trend-chip.down { color: var(--danger); background: #F9E6E3; }
.trend-chip.flat { color: var(--ink-2); background: #EFEDE6; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 160px; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: var(--card); font-family: inherit; min-height: 38px; }
.chain-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.chain-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.chain-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; background: #fff; }
.chain-brand b { font-size: 15px; letter-spacing: .5px; }
.chain-brand small { display: block; color: var(--ink-2); font-size: 11px; font-weight: 400; }
.chain-head-right { display: flex; align-items: center; gap: 10px; }
.flow-step { display: flex; gap: 12px; padding: 12px; border-left: 4px solid var(--line); background: var(--bg); border-radius: 0 10px 10px 0; }
.flow-step.done { border-left-color: var(--ok); }
.flow-step.waiting { border-left-color: var(--warn); background: var(--gold-soft); }
.flow-step.active { border-left-color: var(--info); background: var(--info-soft); }
.flow-step.mine { box-shadow: 0 0 0 2px var(--gold) inset; }
.flow-step .fs-seq { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.flow-step .fs-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.flow-step .fs-meta { color: var(--ink-2); font-size: 12px; margin-top: 3px; }
.flow-step .fs-next { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.flow-arrow { text-align: center; color: var(--ink-3); font-size: 14px; line-height: 1; padding: 2px 0; }
.chain-flow-strip { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.chain-flow-strip .cfs-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.chain-flow-strip .cfs-head b { font-size: 13px; }
.chain-flow-strip .cfs-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.chain-flow-strip .cfs-step { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 8px; background: var(--neutral-soft); color: var(--ink-2); }
.chain-flow-strip .cfs-step.done { background: #E5F5EB; color: var(--ok); }
.chain-flow-strip .cfs-step.waiting { background: var(--gold-soft); color: var(--warn); }
.chain-flow-strip .cfs-step.active { background: #E4EBF7; color: var(--info); }
.chain-flow-strip .cfs-step.mine { box-shadow: 0 0 0 2px var(--gold) inset; font-weight: 600; }
.chain-flow-strip .cfs-step .badge { font-size: 10px; padding: 0 6px; }
.chain-flow-strip .cfs-arrow { color: var(--ink-3); font-size: 12px; }
.chain-flow-strip .cfs-next { margin-top: 8px; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 6px; }
.chain-flow-strip .cfs-next.mine { color: var(--gold-dark); font-weight: 600; }
.nx-next-task .nx-handoff { display: block; flex-basis: 100%; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 5px; }
.badge.ai { background: var(--ai-soft); color: var(--ai); }
.badge.ai::before { background: var(--ai); }

body.cinema .env-bar,
body.cinema .engine-strip,
body.cinema .nx-nba,
body.cinema .nx-drawer,
body.cinema .nx-cmd,
body.cinema .top-actions { display: none !important; }

/* ===== 端到端旅程条 ===== */
.nx-journey {
  margin: 0 0 16px; padding: 12px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.nx-j-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.nx-j-hd b { font-size: 13.5px; }
.nx-j-hd .btn { margin-left: auto; }
.nx-j-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nx-j-step {
  text-decoration: none; font-size: 11.5px; padding: 5px 9px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--bg);
}
.nx-j-step.done { background: #E5F5EB; border-color: var(--brand-line); color: var(--ok); font-weight: 600; }
.nx-j-step.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-dark); font-weight: 700; }
.nx-j-step.cur { box-shadow: 0 0 0 2px rgba(28,174,52,.35); }
.nx-j-arr { color: var(--ink-3); font-size: 11px; }
.task-card {
  display: block; text-decoration: none; color: inherit; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: var(--card);
  transition: .15s;
}
.task-card:hover { border-color: var(--gold); background: var(--card); transform: translateY(-1px); }
.task-card .why { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.task-card .cta-row { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flow-log { font-size: 12px; max-height: 180px; overflow-y: auto; }
.flow-log .fl { padding: 6px 0; border-bottom: 1px dashed var(--neutral-soft); display: flex; gap: 10px; }
.flow-log .fl .t { font-family: var(--mono); color: var(--ink-2); flex-shrink: 0; width: 90px; }
body.cinema .nx-journey { display: none !important; }

.nx-next-task {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 14px;
  background: linear-gradient(90deg, var(--gold-soft), var(--card));
  border: 1px solid rgba(231,169,41,.45); border-radius: 12px; font-size: 13px;
}
.nx-next-task b { flex: 1; min-width: 180px; }
body.cinema .nx-next-task { display: none !important; }

.field-error { outline: 2px solid var(--danger); outline-offset: 1px; }
.draft-bar .draft-list { margin-top: 10px; display: grid; gap: 8px; }
.draft-bar .draft-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.notice-close { float: right; border: none; background: transparent; color: inherit; font-size: 15px; cursor: pointer; line-height: 1.2; padding: 0 2px; }
.relogin-mask { position: fixed; inset: 0; background: rgba(20,48,31,.45); display: grid; place-items: center; z-index: 95; padding: 16px; }
.relogin-card { width: min(380px, 92vw); }

/* ── 零依赖 SVG 图表基元（UI.charts：sparkline/barsH/barsV/funnel）── */
.ui-chart { max-width: 100%; }
.ui-spark { display: inline-block; vertical-align: middle; width: auto; }
.ui-bars { display: grid; gap: 8px; }
.ui-bar-row { display: grid; grid-template-columns: minmax(72px, 22%) 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.ui-bar-l { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-bar-track { height: 10px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; }
.ui-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.ui-bar-v { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.ui-funnel { display: grid; gap: 7px; }
.ui-funnel-row { display: grid; grid-template-columns: minmax(84px, 26%) 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.ui-funnel-l { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-funnel-track { height: 22px; background: var(--brand-soft); border-radius: 6px; overflow: hidden; }
.ui-funnel-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 6px; transition: width .3s ease; }
.ui-funnel-v { min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
