/* Project Prism — 液态玻璃主题层
   加载顺序：styles.css → fonts/fonts.css → prism.css（本文件最后，负责覆盖）
   原则：只做浅场；一处光源、三档玻璃、承光板保对比度；不合成粗体。 */

:root{
  --ink:#13211C; --muted:#5F736D; --line:rgba(19,33,28,.10); --line-soft:rgba(19,33,28,.06);
  --paper:#EEF3EE; --panel:rgba(255,255,255,.64); --nav:#E9F0E9; --nav2:#DFE8E1;
  --accent:#D6F566; --accent2:#BCD94A; --blue:#2FB5A6; --green:#2C9C7F; --red:#C95968; --violet:#A96AA6;
  --amber:#F0AE72;
  --shadow:0 18px 46px rgba(17,40,34,.08);

  --glass-l1:blur(18px) saturate(135%);
  --glass-l2:blur(28px) saturate(160%);
  --glass-l3:blur(40px) saturate(180%);
  --plate:rgba(255,255,255,.55);

  --r-xs:8px; --r-sm:10px; --r-md:14px; --r-lg:18px; --r-xl:24px; --r-pill:999px;

  --font-ui:"Alibaba PuHuiTi 3.0","PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  --font-display:"Smiley Sans","PingFang SC","Microsoft YaHei",sans-serif;
  --font-num:"Space Grotesk","JetBrains Mono","DIN Alternate",ui-monospace,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Consolas,monospace;

  --ease-liquid:cubic-bezier(.22,1,.36,1);
  --ease-snap:cubic-bezier(.34,1.56,.64,1);
  --ease-in-out:cubic-bezier(.65,0,.35,1);
  --d-1:90ms; --d-2:180ms; --d-3:320ms; --d-4:480ms;
}

/* ---------- 基础 ---------- */
html{ -webkit-text-size-adjust:100%; }
body{
  position:relative;
  min-height:100vh;
  font-family:var(--font-ui);
  font-size:14px; line-height:1.62;
  color:var(--ink);
  background:
    radial-gradient(760px 700px at 2% -12%, rgba(198,240,96,.55), transparent 58%),
    radial-gradient(680px 640px at 88% -8%, rgba(84,214,190,.42), transparent 56%),
    radial-gradient(720px 620px at 100% 46%, rgba(240,174,114,.30), transparent 58%),
    radial-gradient(760px 640px at 12% 96%, rgba(169,106,166,.16), transparent 60%),
    linear-gradient(155deg,#EFF6EA 0%,#F6F3EC 48%,#EAF3EE 100%);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body::after{
  position:fixed; inset:0; z-index:3; content:""; pointer-events:none; opacity:.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection{ background:rgba(214,245,102,.55); color:#13211C; }
::-webkit-scrollbar{ width:11px; height:11px; }
::-webkit-scrollbar-thumb{ border:3px solid transparent; border-radius:99px; background:rgba(19,33,28,.20); background-clip:content-box; }
::-webkit-scrollbar-thumb:hover{ background:rgba(19,33,28,.32); background-clip:content-box; }
::-webkit-scrollbar-track{ background:transparent; }

h1,h2,h3,h4{ color:var(--ink); font-weight:700; letter-spacing:0; }
b,strong{ font-weight:700; }
a{ color:#1F8E82; }
:focus-visible{ outline:2px solid rgba(47,181,166,.85); outline-offset:2px; border-radius:6px; }
[hidden]{ display:none !important; }

/* ---------- 壳层 ---------- */
.app-shell{
  display:grid; grid-template-columns:252px minmax(0,1fr); min-height:100vh;
  background:none;
}
.sidebar{
  position:sticky; top:0; z-index:20; height:100vh;
  display:flex; flex-direction:column; gap:0;
  padding:20px 14px 18px;
  color:var(--ink);
  border-right:1px solid rgba(255,255,255,.62);
  background:linear-gradient(170deg,rgba(255,255,255,.60),rgba(238,246,237,.42));
  box-shadow:1px 0 0 rgba(19,33,28,.04), 24px 0 70px rgba(17,40,34,.07);
  -webkit-backdrop-filter:blur(30px) saturate(165%); backdrop-filter:blur(30px) saturate(165%);
}
.brand{ padding:2px 6px 20px; gap:10px; }
.brand-mark{
  width:38px; height:38px; border-radius:12px;
  background:linear-gradient(135deg,var(--accent),#7FDEC9 96%);
  color:#12211C; font-size:20px; font-weight:700;
  box-shadow:0 8px 22px rgba(160,208,90,.28), inset 0 1px rgba(255,255,255,.8);
}
.brand strong{ font-size:14.5px; letter-spacing:-.01em; color:var(--ink); }
.brand span{ margin-top:3px; color:#7C8F88; font-size:9px; letter-spacing:.14em; }

.pipeline-status{
  margin:0 2px 16px; padding:11px 12px; gap:10px;
  border:1px solid var(--line-soft); border-radius:var(--r-md);
  background:rgba(255,255,255,.55);
  -webkit-backdrop-filter:var(--glass-l1); backdrop-filter:var(--glass-l1);
}
.pipeline-status b{ font-size:12px; color:#2A3E38; }
.pipeline-status small{ margin-top:2px; font-size:10.5px; color:#7C8F88; }
.status-dot{ width:7px; height:7px; margin-top:5px; background:#39B98A; box-shadow:0 0 0 4px rgba(57,185,138,.14); }

.main-nav{ display:grid; gap:3px; }
.nav-button{
  gap:10px; padding:9px 10px; border-radius:var(--r-sm);
  color:#41564F; font-size:13px; font-weight:600;
  transition:background var(--d-2) var(--ease-liquid), color var(--d-2) var(--ease-liquid), box-shadow var(--d-2) var(--ease-liquid);
}
.nav-button:hover{ background:rgba(255,255,255,.7); color:var(--ink); }
.nav-button.active{
  color:#16261F;
  background:linear-gradient(100deg,rgba(214,245,102,.72),rgba(151,232,208,.40));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.85), 0 2px 8px rgba(120,180,120,.12);
}
.nav-button.active .nav-icon{ color:#1B3B31; }
.nav-icon{ width:18px; color:#7E928B; font-size:14px; }

.sidebar-footer{
  margin-top:auto; padding:14px 6px 0; border-top:1px solid var(--line-soft);
  color:#7C8F88;
}
.sidebar-footer small{ font-size:10.5px; line-height:1.5; }

.workspace{ min-width:0; display:flex; flex-direction:column; }
.topbar{
  position:sticky; top:12px; z-index:12; height:58px;
  margin:12px 20px 0; padding:0 14px 0 16px;
  border:1px solid rgba(255,255,255,.72); border-radius:var(--r-lg);
  background:rgba(255,255,255,.50);
  box-shadow:0 1px 0 rgba(255,255,255,.95) inset, 0 12px 34px rgba(17,40,34,.07);
  -webkit-backdrop-filter:var(--glass-l2); backdrop-filter:var(--glass-l2);
}
.breadcrumb{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.breadcrumb > span{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:#8A9C95; }
.breadcrumb em{ font-style:normal; font-size:11px; color:#5F736D; }
.project-select{
  min-width:170px; max-width:300px; padding:7px 26px 7px 10px;
  font-size:12.5px; font-weight:600; color:var(--ink);
  border:1px solid var(--line); border-radius:var(--r-sm);
  background:rgba(255,255,255,.72);
}
.top-actions{ gap:8px; }

.view-root{ width:100%; max-width:1480px; margin:0 auto; padding:22px 24px 56px; }

/* ---------- 页面标题 ---------- */
.page-heading{ align-items:flex-end; gap:14px; margin:4px 0 18px; }
.page-heading h1{
  margin:0 0 4px; font-family:var(--font-display); font-weight:400;
  font-size:30px; line-height:1.24; letter-spacing:.01em;
}
.page-heading p{ color:var(--muted); font-size:12.5px; }
.heading-actions{ gap:8px; }
.eyebrow{
  display:inline-block; margin-bottom:6px;
  font-family:var(--font-mono); font-size:10.5px; font-weight:500;
  letter-spacing:.14em; color:#2E8578;
}

/* ---------- 面板 / 卡片 ---------- */
.panel,.metric-card,.asset-card,.queue-card,.project-card,.inline-form,.setup-strip{
  border:1px solid rgba(255,255,255,.78);
  background:linear-gradient(158deg,rgba(255,255,255,.66),rgba(246,252,246,.40));
  box-shadow:0 1px 0 rgba(255,255,255,.98) inset, 0 10px 26px rgba(17,40,34,.055), 0 24px 60px -20px rgba(17,40,34,.10);
  -webkit-backdrop-filter:blur(24px) saturate(150%); backdrop-filter:blur(24px) saturate(150%);
}
.panel{ border-radius:var(--r-lg); }
.panel + .panel{ margin-top:16px; }
.panel-head{ padding:14px 16px; border-bottom:1px solid var(--line-soft); }
.panel-head h2{ font-size:14.5px; letter-spacing:-.01em; }
.panel-head > span,.panel-head small{ font-size:11.5px; color:#7C8F88; }
.panel-body{ padding:16px; }
.panel-hint,.field-hint,.empty-note,.summary-line{ font-size:12px; color:#7C8F88; line-height:1.6; }

.metrics{ grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:16px; }
.metric-card{ border-radius:var(--r-md); padding:14px 16px 15px; }
.metric-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.95);
  box-shadow:0 1px 0 rgba(255,255,255,.95) inset, 0 20px 44px rgba(17,40,34,.10);
}
.metric-top span{ font-size:11.5px; font-weight:600; letter-spacing:.02em; color:#6C8179; }
.metric-value{
  margin:6px 0 2px; font-family:var(--font-num); font-weight:700;
  font-size:28px; line-height:1.1; letter-spacing:-.02em; color:#13211C;
  font-variant-numeric:tabular-nums;
}
.metric-note{ font-size:11px; color:#8A9C95; }

.project-grid{ gap:12px; }
.project-card{ border-radius:var(--r-md); padding:14px 15px; }
.project-card:hover{ transform:translateY(-2px); }
.project-card.active{ box-shadow:0 0 0 1.5px rgba(120,196,120,.65) inset, 0 16px 40px rgba(17,40,34,.09); }

/* ---------- 按钮 ---------- */
.primary-button,.ghost-button,.small-button,.icon-button,.file-button,.avatar-button,.tab-button{
  font-family:inherit; font-weight:600; border-radius:var(--r-sm);
  transition:transform var(--d-1) var(--ease-snap), background var(--d-2) var(--ease-liquid),
             box-shadow var(--d-2) var(--ease-liquid), border-color var(--d-2) var(--ease-liquid), color var(--d-2) var(--ease-liquid);
}
.primary-button{
  padding:9px 15px; font-size:13px;
  border:1px solid rgba(160,196,60,.5);
  background:linear-gradient(110deg,#E1FA8B,#D6F566 58%,#C9EF62);
  color:#16261F;
  box-shadow:0 1px 0 rgba(255,255,255,.85) inset, 0 8px 20px rgba(150,196,60,.24);
}
.primary-button:hover:not(:disabled){ transform:translateY(-1px); background:linear-gradient(110deg,#E9FFA0,#DDF878 58%,#D2F46D); }
.primary-button:active:not(:disabled){ transform:scale(.985); }
.primary-button:disabled{ opacity:.5; cursor:not-allowed; box-shadow:none; }

.ghost-button{
  padding:8px 13px; font-size:12.5px;
  border:1px solid var(--line); background:rgba(255,255,255,.6); color:#33473F;
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
}
.ghost-button:hover{ background:rgba(255,255,255,.86); border-color:rgba(19,33,28,.16); transform:translateY(-1px); }
.ghost-button:active{ transform:scale(.985); }

.small-button{
  padding:5px 10px; font-size:11.5px; border:1px solid var(--line);
  background:rgba(255,255,255,.58); color:#43584F; border-radius:var(--r-xs);
}
.small-button:hover{ background:rgba(255,255,255,.86); }
.small-button.danger,.small-button[data-tone="danger"]{ color:#A63F4E; border-color:rgba(201,89,104,.32); background:rgba(255,241,242,.7); }
.icon-button{
  width:32px; height:32px; display:inline-grid; place-items:center;
  border:1px solid var(--line); border-radius:var(--r-xs);
  background:rgba(255,255,255,.6); color:#41564F; font-size:15px;
}
.icon-button:hover{ background:rgba(255,255,255,.9); }
.avatar-button{
  width:34px; height:34px; border-radius:var(--r-pill); border:1px solid rgba(19,33,28,.12);
  background:linear-gradient(140deg,#233833,#16261F); color:#E4F3EA; font-size:12px; font-weight:700;
}
.file-button{ font-size:12px; padding:7px 11px; border:1px dashed rgba(19,33,28,.18); background:rgba(255,255,255,.5); color:#41564F; }

/* 桌面端隐藏移动端专用控件（.icon-button 的 display 会盖掉原 .mobile-only） */
@media (min-width:901px){ .mobile-only{ display:none !important; } }

/* ---------- 表单 ---------- */
input,select,textarea,.inline-select,.engine-url{
  font-family:inherit; font-size:13px; color:var(--ink);
  border:1px solid var(--line); border-radius:var(--r-sm);
  background:rgba(255,255,255,.7);
  transition:border-color var(--d-2) var(--ease-liquid), box-shadow var(--d-2) var(--ease-liquid), background var(--d-2);
}
input:hover,select:hover,textarea:hover{ background:rgba(255,255,255,.85); }
input:focus,select:focus,textarea:focus{
  outline:none; border-color:rgba(47,181,166,.75);
  box-shadow:0 0 0 3px rgba(47,181,166,.16); background:rgba(255,255,255,.92);
}
textarea{ line-height:1.6; }
label > span,.inline-form label span{ font-size:11px; font-weight:600; letter-spacing:.02em; color:#6C8179; }
.auth-form input,.auth-form textarea{ border-radius:var(--r-sm); }

/* ---------- 内嵌小卡与勾选 ---------- */
.setup-strip{
  padding:12px 14px; border-radius:var(--r-md);
  background:rgba(255,255,255,.46);
  border:1px solid rgba(255,255,255,.7);
}
.setup-strip label{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#3A4F47; }
input[type="checkbox"],input[type="radio"]{
  width:15px; height:15px; margin:0 2px 0 0; vertical-align:-2px;
  accent-color:#2FB5A6; cursor:pointer;
}
.summary-line{ display:flex; flex-wrap:wrap; align-items:baseline; gap:10px; }
.summary-line b{ font-family:var(--font-num); font-size:14px; color:#1B3129; }
.summary-line span{ font-size:12px; color:#6C8179; }

/* ---------- 登录 / 申请页 ---------- */
.access-hero{ background:linear-gradient(140deg,#F1F7EC 0%,#EEF5F1 46%,#F7F1E9 100%); color:var(--ink); }
.access-hero::before{ background:
  radial-gradient(620px 460px at 12% 4%, rgba(214,245,102,.30), transparent 62%),
  radial-gradient(520px 420px at 92% 22%, rgba(47,181,166,.20), transparent 64%),
  radial-gradient(440px 380px at 74% 96%, rgba(240,174,114,.18), transparent 66%); }
.access-hero::after{ content:""; inset:auto -6% -18% auto; width:420px; height:420px;
  background:radial-gradient(circle at 50% 50%, rgba(47,181,166,.14), transparent 68%); }
.access-copy h1{ font-size:clamp(30px,3.05vw,42px); line-height:1.24; letter-spacing:-.02em; text-wrap:balance; }
.access-copy p{ max-width:44ch; color:#5F736D; }
.access-kicker{ color:#2F7F73; }
.access-brand span{ border-radius:12px; background:linear-gradient(140deg,#D6F566,#8FE3CE); color:#16261F; font-family:var(--font-display); font-weight:400; }
.access-features{ gap:10px; }
.access-features > div{ padding:12px 14px; border:1px solid rgba(255,255,255,.7); border-radius:var(--r-md);
  background:rgba(255,255,255,.62); box-shadow:0 10px 24px rgba(32,54,47,.06); backdrop-filter:blur(14px) saturate(140%); }
.access-features b{ color:#2F7F73; font-family:var(--font-num); }
.access-features span{ color:#42544D; }
.access-panel{ background:linear-gradient(150deg,rgba(255,255,255,.55),rgba(240,247,240,.32)); }
.access-card{ border-radius:var(--r-lg); border:1px solid rgba(255,255,255,.75);
  background:linear-gradient(158deg,rgba(255,255,255,.80),rgba(247,252,247,.58));
  box-shadow:0 24px 60px rgba(32,54,47,.10),inset 0 1px rgba(255,255,255,.9);
  backdrop-filter:blur(26px) saturate(155%); }
.access-footnote{ color:#7C8F88; }

/* 登录页：窄屏必须允许收缩，否则 minmax(380/480) 会把布局视口撑到 860 */
@media (max-width:900px){
  .access-page{ grid-template-columns:minmax(0,1fr) !important; }
  .access-hero{ min-height:auto !important; padding:28px 20px 30px !important; }
  .access-panel{ min-height:auto !important; padding:24px 16px 30px !important; }
  .access-card{ width:100% !important; max-width:560px; padding:22px 18px !important; }
  .access-features{ grid-template-columns:1fr; gap:8px; }
  .access-copy h1{ font-size:clamp(24px,6.4vw,34px) !important; }
  .access-copy p{ font-size:13.5px; }
  .access-footnote{ text-align:center; }
}
@media (max-width:480px){
  .access-panel{ padding:18px 12px 26px !important; }
  .access-card{ padding:18px 14px !important; }
  .access-brand b{ font-size:15px; }
}

/* ---------- 素材卡 ---------- */
.asset-preview{
  height:126px; margin-bottom:12px; border-radius:var(--r-sm);
  background:linear-gradient(140deg,rgba(226,241,229,.96),rgba(205,229,223,.82));
  color:#4E7A72; font-family:var(--font-display); font-size:34px; font-weight:400;
  box-shadow:inset 0 1px rgba(255,255,255,.75);
}
.asset-preview.scene{ background:linear-gradient(150deg,#DDEBE1 0 48%,#C4DDD3 48% 52%,#EBF5ED 52%); }
.asset-preview.prop{ background:linear-gradient(140deg,#F3ECDD,#E2D6BF); color:#8A7448; }
.asset-preview.media:has(img),.asset-preview.media:has(video){ background:rgba(232,241,235,.9); }
.asset-card h3{ font-size:13.5px; font-weight:600; margin-bottom:4px; }
.asset-card p{ height:auto; margin-bottom:10px; font-size:11px; color:#7C8F88; }
.asset-meta{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.asset-meta .tag{ font-family:var(--font-mono); font-size:10px; letter-spacing:.02em; color:#6C8179; }
.upload-bar{ align-items:flex-end; gap:10px; }
.upload-bar .upload-drop{ min-width:200px; padding:10px 16px; border-radius:var(--r-sm); }
.upload-bar label span{ font-size:11px; color:#6C8179; }

/* ---------- 标签 / 状态 ---------- */
.tag,.pill,.status-pill{
  font-size:10.5px; font-weight:600; border-radius:var(--r-pill); padding:3px 9px;
  border:1px solid rgba(19,33,28,.07); background:rgba(238,243,238,.9); color:#4C6159;
}
.status-pill{ gap:5px; }
.status-pill.ok,.status-pill[data-tone="ok"]{ background:rgba(214,245,102,.32); color:#3E5A1C; border-color:rgba(160,196,60,.3); }
.status-pill.warn,.status-pill[data-tone="warn"]{ background:rgba(240,174,114,.28); color:#7A4A1C; border-color:rgba(240,174,114,.42); }
.status-pill.bad,.status-pill[data-tone="bad"]{ background:rgba(201,89,104,.18); color:#8E3945; border-color:rgba(201,89,104,.3); }

/* ---------- 表格 ---------- */
.row-actions{ display:flex; flex-wrap:nowrap; justify-content:flex-end; align-items:center; gap:6px; }
.row-actions .small-button,.row-actions .ghost-button,.row-actions .primary-button{
  flex:0 0 auto; padding:4px 9px; font-size:11px; line-height:1.5; white-space:nowrap;
}
.row-actions .primary-button{ padding:4px 10px; }
.heading-actions{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.prompt-table{ font-size:12.5px; }
.prompt-table th{
  font-family:var(--font-mono); font-size:10.5px; font-weight:500; letter-spacing:.08em;
  text-transform:uppercase; color:#7C8F88;
  padding:9px 10px; border-bottom:1px solid var(--line);
  background:rgba(248,251,247,.92);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
}
.prompt-table td{ padding:10px; border-bottom:1px solid var(--line-soft); color:#2C4038; vertical-align:top; }
.prompt-table tbody tr{ transition:background var(--d-2) var(--ease-liquid); }
.prompt-table tbody tr:hover{ background:rgba(255,255,255,.6); }
.prompt-table td small{ font-size:11px; color:#7C8F88; }
.prompt-table .pick-cell input{ width:15px; height:15px; accent-color:#2FB5A6; }
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* ---------- 代码/提示词编辑区（原深色，统一改浅场） ---------- */
.code-editor{
  min-height:230px;
  padding:14px 16px !important;
  border:1px solid var(--line) !important;
  border-radius:var(--r-md) !important;
  background:rgba(252,255,251,.92) !important;
  color:#1B2F28 !important;
  font-family:var(--font-mono) !important;
  font-size:12px !important;
  line-height:1.72 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 8px 24px rgba(17,40,34,.05) !important;
}
.code-editor:focus{ border-color:rgba(47,181,166,.7) !important; box-shadow:0 0 0 3px rgba(47,181,166,.16) !important; }
.package-code{
  padding:14px 16px; border-radius:var(--r-md);
  border:1px solid var(--line);
  background:rgba(247,252,246,.92); color:#27403A;
  font:11.5px/1.75 var(--font-mono);
  white-space:pre-wrap; overflow-wrap:anywhere;
}
.project-card-mark{
  width:38px; height:38px; border-radius:var(--r-sm);
  background:linear-gradient(140deg,#D6F566,#7FDEC9); color:#16261F;
  font-weight:700; font-size:16px;
  box-shadow:inset 0 1px rgba(255,255,255,.7);
}

/* ---------- 剧集 / 流水线 / 预览 ---------- */
.episode-row{ border-radius:var(--r-md); transition:background var(--d-2) var(--ease-liquid); }
.episode-row:hover{ background:rgba(255,255,255,.55); }
.episode-number{ font-family:var(--font-num); font-weight:700; color:#5C736B; font-variant-numeric:tabular-nums; }
.episode-title b{ font-size:13.5px; }
.episode-title small{ font-size:11px; color:#8A9C95; }
.stage-track,.stage-track b{ font-size:11px; }
.script-preview,.preview-box,.prompt-thumb,.upload-drop{
  border-radius:var(--r-md); border:1px solid var(--line-soft); background:rgba(255,255,255,.55);
}
.prompt-thumb img,.asset-thumb img{ border-radius:var(--r-sm); }
.toolbar{ gap:8px; margin-bottom:12px; }

/* ---------- 导入剧本：左栏投放区、右栏粘贴 ---------- */
.import-drop{ align-items:flex-start; gap:18px; }
.import-drop > div{ display:block; flex:1; min-width:260px; }
.import-drop > div > b{ display:block; font-size:13px; color:#2A3E38; }
.import-drop .field-hint{ margin:4px 0 12px; }
.import-drop .file-button{
  display:grid; place-items:center; width:100%; min-height:104px;
  margin-top:2px; padding:16px 18px; gap:8px;
  border:1.5px dashed rgba(47,181,166,.45); border-radius:var(--r-md);
  background:rgba(255,255,255,.52); color:#2C6157; font-size:13px; font-weight:600;
  cursor:pointer; transition:border-color var(--d-2) var(--ease-liquid), background var(--d-2) var(--ease-liquid);
}
.import-drop .file-button::before{
  content:""; width:34px; height:34px; border-radius:50%;
  background:
    linear-gradient(#2FB5A6,#2FB5A6) center/15px 1.6px no-repeat,
    linear-gradient(#2FB5A6,#2FB5A6) center/1.6px 15px no-repeat,
    rgba(47,181,166,.10);
  box-shadow:inset 0 0 0 1px rgba(47,181,166,.20);
}
.import-drop .file-button:hover{ border-color:rgba(47,181,166,.8); background:rgba(236,250,244,.8); }
.import-drop textarea{
  min-height:224px; background:rgba(255,255,255,.66);
  border-radius:var(--r-md); border:1px solid var(--line);
}
.import-drop .heading-actions{ justify-content:flex-end; }

/* ---------- 分段 tabs ---------- */
.tabs{
  display:inline-flex; gap:2px; padding:3px; margin-bottom:14px;
  border:1px solid var(--line-soft); border-radius:var(--r-pill);
  background:rgba(232,239,232,.75);
  box-shadow:inset 0 1px 2px rgba(19,33,28,.04);
}
.tab-button{
  padding:6px 13px; border:0; border-radius:var(--r-pill);
  font-size:12.5px; color:#5F736D; background:transparent;
}
.tab-button:hover{ color:var(--ink); }
.tab-button.active{
  color:#16261F; font-weight:700; border:0;
  background:rgba(255,255,255,.95);
  box-shadow:0 2px 8px rgba(19,33,28,.08), inset 0 1px rgba(255,255,255,.9);
}

/* ---------- 弹窗 / 提示 ---------- */
dialog.project-dialog{
  border:1px solid rgba(255,255,255,.8); border-radius:var(--r-xl);
  background:linear-gradient(160deg,rgba(255,255,255,.94),rgba(246,250,246,.9));
  box-shadow:0 40px 100px rgba(15,34,29,.24), inset 0 1px rgba(255,255,255,.9);
  -webkit-backdrop-filter:var(--glass-l3); backdrop-filter:var(--glass-l3);
}
dialog.project-dialog::backdrop{ background:rgba(16,30,26,.28); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
dialog[open]{ animation:prism-rise var(--d-3) var(--ease-liquid) both; }
@keyframes prism-rise{ from{ opacity:0; transform:translateY(10px) scale(.985); } to{ opacity:1; transform:none; } }
.modal-head h2,.dialog-head h2{ font-family:var(--font-display); font-weight:400; font-size:21px; letter-spacing:.01em; }
.modal-head p,.dialog-hint{ font-size:12.5px; color:#6C8179; }
.modal-actions{ gap:8px; }

.toast{
  border-radius:var(--r-md); padding:11px 15px; font-size:12.5px; min-width:240px;
  background:rgba(255,255,255,.86); color:#17251F;
  border:1px solid rgba(255,255,255,.9); border-left:3px solid #2FB5A6;
  -webkit-backdrop-filter:blur(28px) saturate(160%); backdrop-filter:blur(28px) saturate(160%);
  box-shadow:0 20px 46px rgba(12,26,22,.18), inset 0 1px rgba(255,255,255,.95);
  animation:prism-toast var(--d-3) var(--ease-snap) both;
}
@keyframes prism-toast{ from{ opacity:0; transform:translateY(10px) scale(.96); } to{ opacity:1; transform:none; } }

/* ---------- 登录 / 审核门面 ---------- */
.access-root{ background:transparent; }
.access-page{ grid-template-columns:minmax(380px,1fr) minmax(480px,.94fr); }
.access-hero{
  background:
    radial-gradient(620px 480px at 82% 12%, rgba(214,245,102,.42), transparent 62%),
    radial-gradient(560px 440px at 12% 88%, rgba(47,181,166,.34), transparent 60%),
    linear-gradient(150deg,#EFF6EC 0%,#E8F2EA 52%,#F4EFE8 100%);
  color:var(--ink);
}
.access-hero:before{ display:none; }
.access-hero:after{ color:rgba(19,33,28,.03); }
.access-brand span,.access-brand b{ color:var(--ink); }
.access-kicker{ font-family:var(--font-mono); font-size:11px; letter-spacing:.16em; color:#2E8578; }
.access-copy h1{ font-family:var(--font-display); font-weight:400; color:var(--ink); letter-spacing:.01em; }
.access-copy p{ color:#4C6159; font-size:13.5px; }
.access-features b{ color:#33544A; }
.access-features span{ color:#6C8179; }
.access-features div{ border-color:rgba(19,33,28,.10); background:rgba(255,255,255,.45); border-radius:var(--r-md); }
.access-panel{ background:transparent; }
.access-card,.access-modal-card{
  border:1px solid rgba(255,255,255,.8);
  background:linear-gradient(158deg,rgba(255,255,255,.86),rgba(255,255,255,.68));
  box-shadow:0 30px 80px rgba(15,34,29,.13), inset 0 1px rgba(255,255,255,.95);
  -webkit-backdrop-filter:var(--glass-l2); backdrop-filter:var(--glass-l2);
  border-radius:var(--r-xl);
}
.access-card h2,.access-card h3{ font-size:19px; }
.auth-tabs{ background:rgba(230,238,231,.8); border-radius:var(--r-pill); }
.auth-tabs button{ font-size:12.5px; border-radius:var(--r-pill); }
.auth-tabs button.active{ background:rgba(255,255,255,.95); box-shadow:0 2px 8px rgba(19,33,28,.08); }
.auth-icon,.review-graphic{
  background:linear-gradient(145deg,rgba(214,245,102,.85),rgba(127,222,201,.55));
  color:#1B3B31; border-radius:var(--r-md);
}
.auth-submit{ border-radius:var(--r-sm); font-size:13px; }
.access-footnote{ color:#7C8F88; }

/* ---------- 动效细节 ---------- */
.nav-button,.panel,.metric-card,.project-card,.tag,.status-pill,.toast{ will-change:auto; }
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .panel{ transition:box-shadow var(--d-3) var(--ease-liquid), transform var(--d-3) var(--ease-liquid); }
}
@keyframes prism-fade{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
.view-root > *{ animation:prism-fade var(--d-3) var(--ease-liquid) both; }
.view-root > *:nth-child(2){ animation-delay:40ms; }
.view-root > *:nth-child(3){ animation-delay:80ms; }
.view-root > *:nth-child(4){ animation-delay:110ms; }

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

/* ---------- 响应式 ---------- */
@media (max-width:1180px){
  .app-shell{ grid-template-columns:228px minmax(0,1fr); }
  .view-root{ padding:18px 18px 44px; }
  .page-heading h1{ font-size:27px; }
}
@media (max-width:900px){
  .app-shell{ grid-template-columns:minmax(0,1fr); }
  .mobile-only{ display:inline-grid !important; }
  .sidebar{
    position:fixed; left:0; top:0; width:264px; height:100vh; z-index:60;
    transform:translateX(-105%); transition:transform var(--d-3) var(--ease-liquid);
    background:linear-gradient(170deg,rgba(255,255,255,.94),rgba(238,246,239,.9));
    box-shadow:24px 0 70px rgba(17,40,34,.18);
  }
  .sidebar.open{ transform:none; }
  .topbar{ top:8px; margin:8px 12px 0; height:54px; padding:0 10px 0 12px; border-radius:var(--r-md); }
  .view-root{ padding:16px 14px 40px; }
  .page-heading{ flex-direction:column; align-items:flex-start; gap:10px; }
  .page-heading h1{ font-size:25px; }
}
@media (max-width:560px){
  body{ font-size:13.5px; }
  .topbar{ margin:8px 10px 0; }
  .breadcrumb > span{ display:none; }
  .project-select{ min-width:120px; max-width:42vw; font-size:12px; }
  .view-root{ padding:14px 12px 36px; }
  .page-heading h1{ font-size:23px; }
  .panel-head{ padding:12px 13px; flex-wrap:wrap; gap:6px; }
  .panel-body{ padding:13px; }
  .heading-actions{ width:100%; }
  .heading-actions .primary-button,.heading-actions .ghost-button{ flex:1 1 auto; }
  .metric-value{ font-size:24px; }
  .tabs{ width:100%; overflow-x:auto; }
  .episode-row{ display:flex; flex-wrap:wrap; align-items:flex-start; gap:6px 8px; padding:11px 12px; }
  .episode-number{ flex:0 0 auto; }
  .episode-title{ flex:1 1 120px; min-width:0; }
  .episode-title b{ display:block; font-size:13px; line-height:1.4; }
  .episode-title small{ display:block; margin-top:2px; }
  .episode-row .episode-chip{ margin-left:auto; }
  .row-actions{ flex-wrap:wrap; justify-content:flex-start; }
  .toolbar{ gap:7px; }
  .toolbar .primary-button{ flex:1 1 100%; }
  .toolbar select,.toolbar input[type="text"]{ flex:1 1 140px; }
  .metric-card{ padding:12px 13px 13px; }
  .metric-value{ font-size:22px; }
  .prompt-table th,.prompt-table td{ padding:8px; }
}
@media (prefers-color-scheme:dark){
  /* 产品本期只做浅场，不跟随系统暗色 */
  :root{ color-scheme:light; }
}

/* ---------- PRISM overrides: autofill + narrow access page ---------- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--ink);
  -webkit-box-shadow:0 0 0 1000px #FDFEFA inset, inset 0 0 0 1px rgba(19,33,28,.12);
  transition:background-color 99999s ease-out 0s;
  caret-color:var(--ink);
}

@media (max-width:900px){
  .access-hero{ background:radial-gradient(120% 78% at 50% -10%, rgba(214,245,102,.26), transparent 72%) !important; }
  .access-hero::before{ display:none !important; }
  .access-hero::after{ display:none !important; }
}

/* ---------- PRISM: prompt text two-level (clamp 2 lines + toggle) ---------- */
.prompt-table td .prompt-text{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  transition:max-height var(--d-2) var(--ease-liquid);
}
.prompt-table tr.prompt-open td .prompt-text{
  display:block;
  -webkit-line-clamp:unset;
  overflow:visible;
}
.prompt-table td .prompt-toggle{
  display:inline-flex; align-items:center; gap:4px;
  margin-top:6px; padding:2px 7px;
  border:1px solid rgba(47,181,166,.28); border-radius:999px;
  background:rgba(255,255,255,.72); color:#2C6157;
  font-family:var(--font-ui); font-size:11px; line-height:1.5;
  cursor:pointer; transition:background var(--d-2) var(--ease-liquid), border-color var(--d-2);
}
.prompt-table td .prompt-toggle:hover{ background:#EEF9F2; border-color:rgba(47,181,166,.5); }
.prompt-table td .prompt-toggle:focus-visible{ outline:2px solid rgba(47,181,166,.85); outline-offset:2px; }
.prompt-table td .prompt-toggle[hidden]{ display:none; }
.prompt-table tr.prompt-open td{ background:rgba(255,255,255,.34); }
@media (max-width:900px){
  .prompt-table td .prompt-text{ -webkit-line-clamp:3; }
}

/* ---------- PRISM: dense table scrolls inside its panel (mobile) ---------- */
.panel:has(> .prompt-table){ overflow-x:auto; overscroll-behavior-x:contain; }
.prompt-table{ min-width:660px; }
@media (max-width:900px){
  .view-root{ min-width:0; }
  .panel:has(> .prompt-table){ border-radius:var(--r-lg); }
  .prompt-table{ min-width:700px; }
  .prompt-table thead th{ position:sticky; top:0; z-index:2; }
}

/* ---------- PRISM: prompt toggle as quiet link + compact spec cell ---------- */
.prompt-table td .prompt-toggle{
  margin-top:3px; padding:0; border:0; background:none;
  color:#2F7F73; font-size:11px; line-height:1.4;
  text-decoration:underline; text-decoration-style:dotted; text-underline-offset:3px;
  opacity:.85;
}
.prompt-table td .prompt-toggle:hover{ opacity:1; background:none; text-decoration-style:solid; }
.prompt-table td:nth-child(3) small{ display:inline; margin-left:4px; font-size:10px; color:#7C8F88; }
.prompt-table td:nth-child(3){ white-space:nowrap; }

/* ---------- PRISM: tighter table rhythm ---------- */
.prompt-table tbody td{ padding:10px 12px; }
.prompt-thumb-box{ width:68px; height:48px; border-radius:8px; }
.prompt-thumb{ width:48px; height:48px; }
.prompt-thumb.blank{ font-size:10px; }

/* ---------- PRISM: 导入剧本拖入反馈 ---------- */
.import-drop.is-drag{ background:rgba(255,255,255,.34); border-radius:var(--r-md); }
.import-drop.is-drag .file-button{
  border-color:rgba(47,181,166,.9);
  background:rgba(47,181,166,.12);
  color:#1F5E55;
  box-shadow:0 0 0 4px rgba(47,181,166,.14), inset 0 1px rgba(255,255,255,.8);
}
.import-drop.is-drag .file-button::before{
  transform:scale(1.08);
  background:
    linear-gradient(#2FB5A6,#2FB5A6) center/17px 1.8px no-repeat,
    linear-gradient(#2FB5A6,#2FB5A6) center/1.8px 17px no-repeat,
    rgba(47,181,166,.2);
}
.import-drop .file-button::before{
  transition:transform var(--d-2) var(--ease-snap), background var(--d-2) var(--ease-liquid);
}
.prism-drop-hint{
  display:block; margin:8px auto 0; width:auto; max-width:100%;
  padding:0 2px; font-size:11px; line-height:1.5;
  font-family:var(--font-ui); text-align:center; color:#2C6157;
}
.import-drop .file-button{ position:relative; }
.prism-drop-hint.bad{ color:#B2414F; }
.prism-drop-copy{
  display:inline-block; margin-left:6px; padding:0 6px; height:18px; line-height:17px;
  border:1px solid rgba(178,65,79,.35); border-radius:5px; background:rgba(255,255,255,.7);
  color:#B2414F; font:inherit; font-size:10.5px; cursor:pointer;
}
.prism-drop-copy:hover{ background:#fff; }

/* PRISM 导入页常驻提示 */
.prism-drop-tip{
  margin:8px 0 0; padding:0; width:100%; max-width:100%;
  font-size:11.5px; line-height:1.6; color:#5F736D;
  grid-column:1 / -1;
}
.prism-drop-tip b{ color:#2C6157; font-weight:600; }
.prism-paste-btn{
  margin-left:8px; padding:2px 9px; border-radius:7px; cursor:pointer;
  border:1px solid rgba(47,181,166,.38); background:rgba(255,255,255,.72);
  color:#2C6157; font:inherit; font-size:11px; line-height:1.5;
}
.prism-paste-btn:hover{ background:#fff; border-color:rgba(47,181,166,.7); }
