:root {
  --paper: #f3f0e9;
  --paper-deep: #e9e4da;
  --card: #fbfaf7;
  --ink: #252421;
  --muted: #77736b;
  --faint: #a39d92;
  --line: #ded9cf;
  --line-dark: #c9c2b7;
  --red: #9f312f;
  --red-dark: #7e2322;
  --red-soft: #f1dfdc;
  --green: #526a5b;
  --green-soft: #e3ebe5;
  --gold: #a57b37;
  --blue: #46637a;
  --shadow: 0 14px 50px rgba(47, 42, 35, 0.08);
  --shadow-sm: 0 6px 22px rgba(47, 42, 35, 0.07);
  --radius: 20px;
  --sidebar: 224px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { color-scheme: light; background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255,255,255,.8), transparent 28%),
    linear-gradient(118deg, transparent 0 58%, rgba(105,92,71,.025) 58% 58.2%, transparent 58.2%),
    var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid rgba(159,49,47,.35); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .5; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  padding: 28px 18px 18px;
  display: flex;
  flex-direction: column;
  background: rgba(248,246,240,.9);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 0 8px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
.brand-mark { position: relative; display: block; width: 35px; height: 37px; flex: 0 0 auto; }
.brand-mark i { position: absolute; display: block; width: 25px; height: 31px; border: 1.5px solid var(--ink); background: var(--card); }
.brand-mark i:nth-child(1) { left: 0; top: 4px; transform: rotate(-7deg); }
.brand-mark i:nth-child(2) { left: 5px; top: 2px; transform: rotate(1deg); }
.brand-mark i:nth-child(3) { left: 9px; top: 5px; background: var(--red); border-color: var(--red); transform: rotate(7deg); }
.brand strong { display: block; font-family: "Songti SC", SimSun, serif; font-size: 18px; letter-spacing: .12em; white-space: nowrap; }
.brand small { display: block; margin-top: 3px; color: var(--faint); font-family: Georgia, serif; font-size: 7px; letter-spacing: .18em; white-space: nowrap; }

.side-nav { margin-top: 52px; display: grid; gap: 7px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  padding: 0 15px;
  color: var(--muted);
  border: 0;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  transition: .2s ease;
}
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.58); }
.nav-item.active { color: var(--ink); background: #e8e3d9; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 3px; background: var(--red); }
.nav-item svg { width: 19px; height: 19px; }
.nav-item b { margin-left: auto; min-width: 21px; padding: 2px 6px; color: white; border-radius: 20px; background: var(--red); font-size: 10px; font-weight: 600; text-align: center; }
.sidebar-foot { margin-top: auto; }
.mini-profile { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.54); cursor: pointer; text-align: left; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; color: white; border-radius: 50%; background: var(--red); font-family: serif; }
.mini-profile strong, .mini-profile small { display: block; }
.mini-profile strong { font-size: 13px; }
.mini-profile small { margin-top: 2px; color: var(--faint); font-size: 10px; }
.mini-profile svg { width: 17px; color: var(--faint); }

.main-canvas { min-height: 100vh; margin-left: var(--sidebar); }
.page-host { width: min(1440px, 100%); min-height: 100vh; margin: 0 auto; padding: 36px 44px 70px; animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.mobile-topbar, .bottom-nav { display: none; }

.eyebrow { display: block; margin-bottom: 8px; color: var(--red); font-family: Georgia, serif; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.page-title { margin: 0; font-family: "Songti SC", SimSun, serif; font-size: clamp(28px, 3vw, 42px); font-weight: 700; letter-spacing: -.04em; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.section-title { margin: 0; font-family: "Songti SC", SimSun, serif; font-size: 21px; letter-spacing: -.02em; }
.section-meta { margin-left: 10px; color: var(--faint); font-size: 12px; font-weight: 400; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; padding: 3px; color: var(--muted); border: 0; background: none; cursor: pointer; font-size: 12px; }
.text-link:hover { color: var(--red); }
.text-link svg { width: 14px; height: 14px; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-dark); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 18px; height: 18px; }
.btn { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 13px; transition: .18s ease; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { color: white; background: var(--red); border-color: var(--red); box-shadow: 0 7px 18px rgba(159,49,47,.18); }
.btn.primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn.ghost { border-color: var(--line); background: rgba(255,255,255,.58); }
.btn.ghost:hover { background: white; border-color: var(--line-dark); }
.btn.dark { color: white; background: var(--ink); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 11px; border-radius: 9px; }

/* Home */
.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 27px; }
.date-stamp { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 12px; }
.date-stamp i { display: block; width: 24px; height: 1px; background: var(--line-dark); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
.home-main { min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 17px; }
.metric-card { min-height: 104px; padding: 18px; border: 1px solid rgba(211,205,194,.7); border-radius: 17px; background: rgba(252,251,248,.72); }
.metric-card small { display: block; color: var(--muted); font-size: 11px; }
.metric-value { display: flex; align-items: baseline; gap: 4px; margin-top: 10px; }
.metric-value strong { font-family: Georgia, "Songti SC", serif; font-size: 27px; font-weight: 500; }
.metric-value span { color: var(--faint); font-size: 11px; }
.metric-foot { margin-top: 8px; color: var(--green); font-size: 10px; }
.metric-card.risk .metric-value strong { color: var(--gold); }

.hero-create {
  position: relative;
  min-height: 216px;
  margin-bottom: 28px;
  padding: 31px 36px;
  overflow: hidden;
  color: #f6f2e9;
  border-radius: 24px;
  background: #292724;
  box-shadow: var(--shadow);
}
.hero-create::before { content: ""; position: absolute; right: -35px; bottom: -85px; width: 270px; height: 270px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018); }
.hero-create::after { content: "ARCHIVE\A NO. 028"; white-space: pre; position: absolute; right: 28px; top: 24px; color: rgba(255,255,255,.12); font: 700 10px/1.7 Georgia, serif; letter-spacing: .18em; text-align: right; }
.hero-copy { position: relative; z-index: 2; max-width: 520px; }
.hero-create .eyebrow { color: #c9847c; }
.hero-create h2 { margin: 0 0 9px; font-family: "Songti SC", SimSun, serif; font-size: 28px; font-weight: 600; }
.hero-create p { margin: 0 0 23px; color: rgba(255,255,255,.58); font-size: 12px; line-height: 1.7; }
.hero-button { min-width: 176px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: white; border: 0; border-radius: 12px; background: var(--red); cursor: pointer; font-weight: 700; box-shadow: 0 10px 22px rgba(0,0,0,.25); }
.hero-button:hover { background: #ad3a37; transform: translateY(-1px); }
.hero-button svg { width: 18px; }
.hero-lines { position: absolute; right: 43px; bottom: 32px; z-index: 1; display: grid; gap: 6px; opacity: .25; transform: rotate(-5deg); }
.hero-lines i { display: block; width: 120px; height: 1px; background: white; }
.hero-lines i:nth-child(2) { width: 92px; margin-left: 14px; }
.hero-lines i:nth-child(3) { width: 70px; margin-left: 28px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 32px; }
.quick-card { min-height: 78px; padding: 13px 15px; display: flex; align-items: center; gap: 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 15px; background: rgba(251,250,247,.65); cursor: pointer; text-align: left; transition: .18s ease; }
.quick-card:hover { border-color: var(--line-dark); background: white; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; color: var(--red); border-radius: 11px; background: var(--red-soft); }
.quick-icon svg { width: 17px; height: 17px; }
.quick-card strong, .quick-card small { display: block; }
.quick-card strong { font-size: 12px; }
.quick-card small { margin-top: 3px; color: var(--faint); font-size: 9px; }

.project-list { display: grid; gap: 9px; }
.project-row { display: grid; grid-template-columns: 48px minmax(0,1fr) 100px 80px 30px; align-items: center; gap: 14px; min-height: 72px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(251,250,247,.66); cursor: pointer; transition: .18s; }
.project-row:hover { background: white; border-color: var(--line-dark); box-shadow: var(--shadow-sm); }
.project-index { position: relative; display: grid; place-items: center; width: 46px; height: 50px; color: white; border-radius: 8px 8px 3px 3px; background: var(--project-color, var(--red)); font: 600 15px Georgia, serif; box-shadow: inset 0 -7px rgba(0,0,0,.08); }
.project-index::after { content: ""; position: absolute; top: 6px; right: -3px; width: 6px; height: 28px; background: rgba(255,255,255,.38); }
.project-title strong { display: block; margin-bottom: 5px; font-family: "Songti SC", SimSun, serif; font-size: 14px; }
.project-title small { color: var(--faint); font-size: 10px; }
.status-pill { width: fit-content; padding: 5px 9px; color: var(--red); border-radius: 20px; background: var(--red-soft); font-size: 10px; }
.status-pill.green { color: var(--green); background: var(--green-soft); }
.status-pill.gray { color: var(--muted); background: #ece8e0; }
.progress-mini { font-size: 10px; color: var(--faint); text-align: right; }
.progress-mini span { display: block; height: 3px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: #ddd7cd; }
.progress-mini i { display: block; height: 100%; background: var(--red); }
.row-more { border: 0; background: none; color: var(--faint); cursor: pointer; }

.home-aside { display: grid; align-content: start; gap: 13px; }
.aside-card { padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: rgba(251,250,247,.7); }
.aside-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.aside-head h3 { margin: 0; font-family: "Songti SC", serif; font-size: 16px; }
.aside-head small { color: var(--faint); font-size: 9px; }
.performance-feature { position: relative; padding: 16px; overflow: hidden; color: white; border-radius: 14px; background: linear-gradient(135deg, #79504a, #2d2927 75%); }
.performance-feature::after { content:""; position:absolute; width:110px; height:110px; border:1px solid rgba(255,255,255,.12); border-radius:50%; right:-25px; top:-30px; }
.performance-feature small { color: rgba(255,255,255,.55); font-size: 9px; }
.performance-feature h4 { margin: 9px 0 5px; font-family: "Songti SC", serif; font-size: 20px; }
.performance-feature p { margin: 0; color: rgba(255,255,255,.65); font-size: 10px; }
.performance-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 14px; }
.performance-stats strong, .performance-stats small { display: block; }
.performance-stats strong { font: 16px Georgia, serif; }
.performance-stats small { margin-top: 3px; }
.risk-list { display: grid; gap: 13px; }
.risk-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start; }
.risk-item > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--gold); }
.risk-item strong, .risk-item small { display: block; }
.risk-item strong { font-size: 11px; font-weight: 600; }
.risk-item small { margin-top: 3px; color: var(--faint); font-size: 9px; line-height: 1.45; }
.risk-item b { color: var(--gold); font: 500 11px Georgia, serif; }
.archive-tip { position: relative; padding-left: 44px; }
.archive-tip::before { content: "“"; position: absolute; left: 16px; top: 12px; color: var(--red); font: 40px Georgia,serif; }
.archive-tip p { margin: 0; color: var(--muted); font-family: "Songti SC", serif; font-size: 12px; line-height: 1.8; }

/* Common list pages */
.page-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 25px; }
.search-field { min-width: 260px; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.62); }
.search-field svg { width: 16px; color: var(--faint); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: none; font-size: 12px; }
.filter-row { display: flex; gap: 7px; margin-bottom: 19px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.45); cursor: pointer; color: var(--muted); font-size: 11px; }
.filter-chip.active { color: white; border-color: var(--ink); background: var(--ink); }
.article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.article-card { position: relative; min-height: 245px; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(251,250,247,.76); cursor: pointer; transition: .2s ease; }
.article-card:hover { transform: translateY(-3px); background: white; box-shadow: var(--shadow); }
.article-card::after { content: attr(data-index); position: absolute; right: 14px; bottom: -9px; color: rgba(60,55,48,.045); font: 700 76px Georgia,serif; }
.article-top { display: flex; justify-content: space-between; gap: 10px; }
.article-no { color: var(--red); font: 700 9px Georgia,serif; letter-spacing: .14em; }
.article-card h3 { max-width: 90%; margin: 27px 0 8px; font-family: "Songti SC",serif; font-size: 22px; }
.article-card > p { min-height: 38px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.tag-row { position: relative; z-index: 1; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 19px; }
.tag { padding: 4px 8px; color: var(--muted); border-radius: 10px; background: #ece8e0; font-size: 9px; }
.article-foot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; }

/* Workspace */
.workspace-page { max-width: 1280px; margin: 0 auto; }
.workspace-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px; color: var(--muted); border: 0; background: none; cursor: pointer; font-size: 11px; }
.back-link svg { width: 14px; transform: rotate(180deg); }
.workspace-title { display: flex; align-items: center; gap: 12px; }
.workspace-title h1 { margin: 0; font-family: "Songti SC",serif; font-size: 28px; }
.workspace-title small { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; }
.save-state { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 10px; }
.save-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.workflow-strip { position: relative; display: grid; grid-template-columns: repeat(9,minmax(68px,1fr)); padding: 16px 10px 12px; margin-bottom: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: rgba(251,250,247,.72); scrollbar-width: none; }
.workflow-strip::-webkit-scrollbar { display: none; }
.workflow-strip::before { content:""; position:absolute; left:5.8%; right:5.8%; top:30px; height:1px; background: var(--line); }
.step-button { position: relative; z-index:1; min-width: 68px; border:0; background:none; cursor:pointer; text-align:center; }
.step-dot { display:grid; place-items:center; width:28px; height:28px; margin:0 auto 7px; color:var(--faint); border:1px solid var(--line-dark); border-radius:50%; background:var(--card); font:600 10px Georgia,serif; }
.step-button span:last-child { color:var(--faint); font-size:9px; }
.step-button.done .step-dot { color:white; border-color:var(--green); background:var(--green); }
.step-button.done span:last-child { color:var(--muted); }
.step-button.active .step-dot { color:white; border-color:var(--red); background:var(--red); box-shadow:0 0 0 5px var(--red-soft); }
.step-button.active span:last-child { color:var(--ink); font-weight:700; }
.workspace-content { animation: pageIn .25s ease both; }
.workspace-layout { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:17px; }
.workspace-layout.wide-aside { grid-template-columns:minmax(0,1fr) 330px; }
.panel { border:1px solid var(--line); border-radius:18px; background:rgba(251,250,247,.78); box-shadow:0 2px 0 rgba(255,255,255,.45) inset; }
.panel-pad { padding:22px; }
.panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:20px; }
.panel-head h2 { margin:0; font-family:"Songti SC",serif; font-size:20px; }
.panel-head p { margin:6px 0 0; color:var(--muted); font-size:10px; line-height:1.6; }
.panel-tools { display:flex; gap:7px; }
.info-line { display:flex; align-items:center; gap:8px; color:var(--faint); font-size:10px; }
.info-line svg { width:14px; }
.side-stack { display:grid; align-content:start; gap:12px; }
.side-card { padding:17px; border:1px solid var(--line); border-radius:16px; background:rgba(251,250,247,.72); }
.side-card h3 { margin:0 0 13px; font-family:"Songti SC",serif; font-size:14px; }
.side-card p { margin:0; color:var(--muted); font-size:10px; line-height:1.7; }
.side-action-list { display:grid; gap:7px; }
.side-action { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:42px; padding:0 11px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.5); cursor:pointer; font-size:11px; }
.side-action:hover { background:white; }
.side-action svg { width:14px; color:var(--faint); }
.rule-list { display:grid; gap:9px; }
.rule-item { display:flex; align-items:flex-start; gap:8px; color:var(--muted); font-size:9px; line-height:1.5; }
.rule-item i { display:grid; place-items:center; width:16px; height:16px; flex:0 0 auto; color:var(--green); border-radius:50%; background:var(--green-soft); font-style:normal; font-size:9px; }

/* Extract */
.import-zone { padding:35px 24px; text-align:center; border:1px dashed var(--line-dark); border-radius:16px; background:rgba(255,255,255,.35); }
.import-icon { display:grid; place-items:center; width:56px; height:56px; margin:0 auto 15px; color:var(--red); border-radius:18px; background:var(--red-soft); }
.import-zone h3 { margin:0 0 7px; font-family:"Songti SC",serif; font-size:18px; }
.import-zone p { margin:0 0 18px; color:var(--muted); font-size:10px; }
.import-zone .input-wrap { max-width:560px; margin:0 auto 10px; }
.meta-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.meta-cell { padding:13px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.45); }
.meta-cell small,.meta-cell strong { display:block; }
.meta-cell small { color:var(--faint); font-size:9px; }
.meta-cell strong { margin-top:5px; font-size:11px; }

/* Analysis */
.recommend-banner { display:grid; grid-template-columns:88px 1fr auto; align-items:center; gap:18px; padding:20px; margin-bottom:14px; color:#f7f3eb; border-radius:16px; background:linear-gradient(120deg,#34312e,#22211f); }
.score-ring { position:relative; display:grid; place-items:center; width:75px; height:75px; border-radius:50%; background:conic-gradient(var(--red) 0 313deg,rgba(255,255,255,.12) 313deg); }
.score-ring::before { content:""; position:absolute; inset:6px; border-radius:50%; background:#292724; }
.score-ring strong { position:relative; z-index:1; font:26px Georgia,serif; }
.score-ring small { position:relative; z-index:1; margin-left:2px; font-size:9px; color:rgba(255,255,255,.5); }
.recommend-copy small { color:#c7857d; font-size:9px; letter-spacing:.14em; }
.recommend-copy h3 { margin:5px 0 5px; font-family:"Songti SC",serif; font-size:21px; }
.recommend-copy p { margin:0; color:rgba(255,255,255,.58); font-size:9px; line-height:1.6; }
.recommend-label { padding:7px 11px; color:#b9d0bf; border:1px solid rgba(185,208,191,.28); border-radius:20px; background:rgba(82,106,91,.25); font-size:10px; }
.analysis-columns { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.analysis-box { padding:17px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.38); }
.analysis-box h3 { margin:0 0 14px; font-size:12px; }
.story-facts { display:grid; gap:10px; }
.story-fact { display:grid; grid-template-columns:82px 1fr; gap:10px; font-size:10px; line-height:1.55; }
.story-fact span { color:var(--faint); }
.score-list { display:grid; gap:10px; }
.score-bar { display:grid; grid-template-columns:82px 1fr 24px; align-items:center; gap:9px; font-size:9px; }
.score-bar span:first-child { color:var(--muted); }
.bar-track { height:5px; overflow:hidden; border-radius:5px; background:#e7e2d9; }
.bar-track i { display:block; height:100%; border-radius:5px; background:var(--red); }
.score-bar b { font:500 10px Georgia,serif; text-align:right; }
.story-dna { display:flex; flex-wrap:wrap; gap:6px; }
.story-dna span { padding:5px 8px; color:var(--red-dark); border:1px solid #ead1cd; border-radius:13px; background:var(--red-soft); font-size:9px; }

/* Names */
.name-intro { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:14px; padding:14px 16px; color:var(--muted); border-radius:13px; background:#ece8e0; font-size:10px; }
.name-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.name-card { position:relative; min-height:145px; padding:15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.42); cursor:pointer; transition:.18s; }
.name-card:hover,.name-card.selected { border-color:rgba(159,49,47,.55); background:white; box-shadow:var(--shadow-sm); }
.name-card.selected::before { content:"✓"; position:absolute; right:10px; top:10px; display:grid; place-items:center; width:19px; height:19px; color:white; border-radius:50%; background:var(--red); font-size:10px; }
.name-type { color:var(--faint); font-size:8px; letter-spacing:.12em; }
.name-card h3 { margin:12px 0 8px; font-family:"Songti SC",serif; font-size:22px; letter-spacing:.13em; }
.name-reason { height:31px; margin:0; overflow:hidden; color:var(--muted); font-size:9px; line-height:1.55; }
.name-score { display:flex; justify-content:space-between; margin-top:10px; padding-top:9px; border-top:1px solid var(--line); color:var(--faint); font-size:8px; }
.name-score b { color:var(--red); font:500 11px Georgia,serif; }
.ai-pick { position:absolute; left:0; top:0; padding:3px 7px; color:white; border-radius:13px 0 8px 0; background:var(--red); font-size:7px; }

/* Hooks and polish */
.editor-tabs { display:none; gap:6px; margin-bottom:12px; }
.editor-tab { flex:1; min-height:36px; border:1px solid var(--line); border-radius:9px; background:transparent; font-size:10px; }
.editor-tab.active { color:white; border-color:var(--ink); background:var(--ink); }
.compare-grid { display:grid; grid-template-columns:1fr 1fr; min-height:520px; overflow:hidden; border:1px solid var(--line); border-radius:15px; }
.document-pane { min-width:0; padding:20px; background:rgba(255,255,255,.38); }
.document-pane + .document-pane { border-left:1px solid var(--line); background:rgba(255,255,255,.72); }
.document-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.document-head strong { font-family:"Songti SC",serif; font-size:13px; }
.document-head span { color:var(--faint); font-size:9px; }
.story-text { font-family:"Songti SC",serif; font-size:14px; line-height:2; }
.story-text p { margin:0 0 17px; }
.story-text .changed { position:relative; margin-left:-8px; padding:5px 8px; border-left:2px solid var(--red); border-radius:0 7px 7px 0; background:var(--red-soft); cursor:pointer; }
.story-text .locked { position:relative; padding-right:23px; color:#55514b; }
.story-text .locked::after { content:"锁"; position:absolute; right:0; top:3px; color:var(--faint); font:9px sans-serif; }
.word-count-strip { display:flex; justify-content:space-between; gap:12px; margin-top:12px; padding:13px 16px; border-radius:12px; background:#ebe7df; color:var(--muted); font-size:10px; }
.word-count-strip b { color:var(--ink); font:500 12px Georgia,serif; }
.word-count-strip .positive { color:var(--green); }
.version-list { display:grid; gap:8px; }
.version-card { position:relative; padding:14px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.42); cursor:pointer; }
.version-card.active { border-color:rgba(159,49,47,.5); background:white; box-shadow:var(--shadow-sm); }
.version-title { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.version-title b { display:grid; place-items:center; width:23px; height:23px; color:white; border-radius:7px; background:var(--ink); font:11px Georgia,serif; }
.version-card.active .version-title b { background:var(--red); }
.version-title strong { font-size:11px; }
.version-title span { margin-left:auto; color:var(--faint); font-size:8px; }
.version-card p { margin:0; color:var(--muted); font-family:"Songti SC",serif; font-size:10px; line-height:1.7; }
.reason-popover { display:none; position:fixed; z-index:80; width:280px; padding:15px; border:1px solid var(--line); border-radius:14px; background:white; box-shadow:0 20px 60px rgba(35,30,25,.2); }
.reason-popover.show { display:block; animation:pageIn .2s ease both; }
.reason-popover small { color:var(--red); font-size:8px; letter-spacing:.13em; }
.reason-popover p { margin:7px 0 11px; color:var(--muted); font-size:10px; line-height:1.6; }

/* Script */
.script-options { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:15px; }
.script-option { position:relative; min-height:146px; padding:15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.4); cursor:pointer; }
.script-option.active { color:white; border-color:var(--ink); background:var(--ink); }
.script-no { color:var(--red); font:700 9px Georgia,serif; }
.script-option.active .script-no { color:#d48b82; }
.script-option h3 { margin:15px 0 7px; font-family:"Songti SC",serif; font-size:15px; }
.script-option p { margin:0; color:var(--muted); font-size:9px; line-height:1.6; }
.script-option.active p { color:rgba(255,255,255,.54); }
.script-option span { position:absolute; left:15px; bottom:13px; color:var(--faint); font-size:8px; }
.duration-switch { display:flex; gap:6px; }
.duration-button { padding:7px 10px; border:1px solid var(--line); border-radius:9px; background:transparent; color:var(--muted); cursor:pointer; font-size:9px; }
.duration-button.active { color:white; border-color:var(--red); background:var(--red); }
.shot-list { display:grid; gap:8px; }
.shot-card { display:grid; grid-template-columns:62px minmax(0,1.1fr) minmax(0,1fr) 80px; gap:12px; align-items:start; padding:13px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.38); }
.shot-time { color:var(--red); font:600 10px Georgia,serif; }
.shot-block small { display:block; margin-bottom:5px; color:var(--faint); font-size:8px; }
.shot-block p { margin:0; color:var(--muted); font-size:9px; line-height:1.55; }
.retention { width:fit-content; padding:4px 7px; color:var(--green); border-radius:9px; background:var(--green-soft); font-size:8px; }

/* Assets */
.repeat-warning { display:flex; align-items:flex-start; gap:13px; padding:15px; margin-bottom:14px; border:1px solid #e5d3ad; border-radius:14px; background:#f4ecda; }
.repeat-warning > svg { flex:0 0 auto; color:var(--gold); }
.repeat-warning h3 { margin:0 0 4px; font-size:11px; }
.repeat-warning p { margin:0; color:#806b47; font-size:9px; line-height:1.6; }
.repeat-warning b { margin-left:auto; color:var(--gold); font:500 18px Georgia,serif; }
.asset-suggestions { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.asset-card { min-height:160px; padding:15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.4); }
.asset-visual { height:66px; display:flex; align-items:center; justify-content:center; margin-bottom:12px; overflow:hidden; border-radius:10px; background:#e7e2d9; }
.asset-visual.person { background:linear-gradient(160deg,#ddd5c8,#aaa397); }
.asset-visual.person::before { content:""; width:28px; height:44px; border-radius:50% 50% 35% 35%; background:#6a625b; box-shadow:0 26px 0 15px #6a625b; }
.asset-visual.object { background:linear-gradient(145deg,#272625,#504b46); }
.asset-visual.object::before { content:"02:13"; padding:10px 17px; color:#c8dbec; border:3px solid #171717; border-radius:7px; background:#222; font:12px monospace; box-shadow:0 6px 12px rgba(0,0,0,.35); }
.asset-visual.archive { position:relative; background:#e8dfcf; }
.asset-visual.archive::before { content:"CHAT / 02:13"; width:70%; padding:8px; color:#5e5750; border:1px solid #bdb3a3; background:#f4efe5; font:8px Georgia,serif; }
.asset-card h3 { margin:0 0 5px; font-size:11px; }
.asset-card p { margin:0; color:var(--faint); font-size:8px; line-height:1.5; }
.keyword-box { margin-top:9px; padding:8px; border-radius:8px; background:#ece8e0; color:var(--muted); font-size:8px; line-height:1.5; }
.asset-library-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.asset-library-card { min-height:120px; padding:13px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.4); }
.asset-library-card .asset-thumb { height:55px; margin-bottom:9px; border-radius:8px; background:linear-gradient(135deg,var(--a,#b3aca0),var(--b,#625e57)); }
.asset-library-card strong { display:block; font-size:10px; }
.asset-library-card small { color:var(--faint); font-size:8px; }

/* Checks */
.check-summary { display:grid; grid-template-columns:170px 1fr; gap:22px; align-items:center; padding:20px; margin-bottom:14px; border-radius:16px; background:#292724; color:white; }
.gauge { position:relative; width:146px; height:75px; overflow:hidden; }
.gauge::before { content:""; position:absolute; inset:0 0 auto; height:146px; border-radius:50%; background:conic-gradient(from 270deg,var(--green) 0 142deg,rgba(255,255,255,.1) 142deg 180deg,transparent 180deg); }
.gauge::after { content:""; position:absolute; inset:14px 14px auto; height:118px; border-radius:50%; background:#292724; }
.gauge strong { position:absolute; z-index:1; left:0; right:0; bottom:0; text-align:center; font:27px Georgia,serif; }
.check-summary h3 { margin:0 0 7px; font-family:"Songti SC",serif; font-size:20px; }
.check-summary p { margin:0; color:rgba(255,255,255,.57); font-size:9px; line-height:1.7; }
.check-badges { display:flex; flex-wrap:wrap; gap:6px; margin-top:11px; }
.check-badges span { padding:5px 8px; color:#bad2c1; border-radius:10px; background:rgba(82,106,91,.35); font-size:8px; }
.check-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.check-card { padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.4); }
.check-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; }
.check-card h3 { margin:0; font-size:11px; }
.check-card-head span { color:var(--green); font-size:9px; }
.check-row { display:grid; grid-template-columns:1fr auto; gap:10px; padding:8px 0; border-top:1px solid var(--line); font-size:9px; }
.check-row span { color:var(--muted); }
.check-row b { font-weight:500; color:var(--green); }
.check-row b.warn { color:var(--gold); }
.compliance-note { display:flex; gap:10px; padding:12px; margin-top:12px; color:var(--muted); border-radius:11px; background:#ece8e0; font-size:9px; line-height:1.6; }
.compliance-note svg { flex:0 0 auto; width:15px; color:var(--gold); }

/* Final */
.final-preview { max-width:700px; margin:0 auto; padding:34px clamp(20px,5vw,54px); border:1px solid var(--line); border-radius:16px; background:#fdfcf9; box-shadow:0 16px 40px rgba(42,38,32,.07); }
.final-stamp { display:flex; align-items:center; justify-content:space-between; margin-bottom:25px; color:var(--faint); font:8px Georgia,serif; letter-spacing:.17em; }
.final-stamp b { padding:5px 8px; color:var(--red); border:1px solid var(--red); transform:rotate(-3deg); }
.final-preview h2 { margin:0 0 25px; text-align:center; font-family:"Songti SC",serif; font-size:28px; letter-spacing:.22em; }
.final-preview .opening { margin:0 0 22px; color:var(--red); text-align:center; font-size:11px; }
.final-story { font-family:"Songti SC",serif; font-size:14px; line-height:2.05; }
.final-story p { margin:0 0 18px; }
.final-ending { margin-top:28px; padding-top:18px; color:var(--muted); border-top:1px dashed var(--line-dark); font-size:11px; line-height:1.8; }
.publish-list { display:grid; gap:8px; }
.publish-item { padding:11px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.45); }
.publish-item small { display:block; color:var(--faint); font-size:8px; }
.publish-item p { margin:5px 0 0; font-size:10px; line-height:1.55; }
.final-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }

/* Analytics and profile */
.analytics-hero { display:grid; grid-template-columns:1.2fr .8fr; gap:14px; margin-bottom:18px; }
.chart-card { min-height:250px; padding:20px; border:1px solid var(--line); border-radius:18px; background:rgba(251,250,247,.75); }
.chart-card h3 { margin:0; font-family:"Songti SC",serif; font-size:16px; }
.chart-card > p { margin:5px 0 0; color:var(--faint); font-size:9px; }
.line-chart { position:relative; height:135px; margin-top:25px; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to bottom,transparent 0 32px,rgba(200,193,181,.5) 32px 33px); }
.line-chart svg { width:100%; height:100%; overflow:visible; }
.line-chart polyline { fill:none; stroke:var(--red); stroke-width:2.2; vector-effect:non-scaling-stroke; }
.line-chart circle { fill:var(--card); stroke:var(--red); stroke-width:1.8; }
.chart-labels { display:flex; justify-content:space-between; margin-top:8px; color:var(--faint); font-size:8px; }
.insight-card { padding:21px; color:white; border-radius:18px; background:var(--ink); }
.insight-card .eyebrow { color:#cc827b; }
.insight-card h3 { margin:0 0 14px; font-family:"Songti SC",serif; font-size:21px; }
.insight-item { padding:11px 0; border-top:1px solid rgba(255,255,255,.1); }
.insight-item strong { display:block; font-size:10px; }
.insight-item p { margin:4px 0 0; color:rgba(255,255,255,.52); font-size:9px; line-height:1.55; }
.review-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }
.review-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:rgba(251,250,247,.72); }
.review-card small { color:var(--faint); font-size:9px; }
.review-card h3 { margin:8px 0 5px; font-family:"Songti SC",serif; font-size:19px; }
.review-card p { margin:0; color:var(--muted); font-size:9px; line-height:1.6; }
.profile-grid { display:grid; grid-template-columns:330px 1fr; gap:16px; }
.brand-profile { padding:25px; color:white; border-radius:20px; background:var(--ink); }
.brand-profile .avatar { width:64px; height:64px; margin-bottom:17px; font-size:25px; }
.brand-profile h2 { margin:0; font-family:"Songti SC",serif; font-size:25px; }
.brand-profile > p { margin:8px 0 20px; color:rgba(255,255,255,.52); font-size:10px; }
.brand-quote { padding:16px 0; border-top:1px solid rgba(255,255,255,.1); border-bottom:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.75); font-family:"Songti SC",serif; font-size:13px; line-height:1.8; }
.profile-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:19px; }
.profile-stats strong,.profile-stats small { display:block; }
.profile-stats strong { font:20px Georgia,serif; }
.profile-stats small { color:rgba(255,255,255,.4); font-size:8px; }
.settings-list { display:grid; gap:9px; }
.setting-card { display:flex; align-items:center; gap:13px; min-height:67px; padding:14px; border:1px solid var(--line); border-radius:14px; background:rgba(251,250,247,.72); }
.setting-icon { display:grid; place-items:center; width:39px; height:39px; flex:0 0 auto; color:var(--red); border-radius:11px; background:var(--red-soft); }
.setting-icon svg { width:17px; }
.setting-copy strong,.setting-copy small { display:block; }
.setting-copy strong { font-size:11px; }
.setting-copy small { margin-top:4px; color:var(--faint); font-size:9px; }
.setting-card .text-link { margin-left:auto; }

/* Modals */
.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; background:rgba(31,29,26,.48); backdrop-filter:blur(8px); opacity:0; visibility:hidden; transition:.22s ease; }
.modal-backdrop.open { opacity:1; visibility:visible; }
.modal { width:min(640px,100%); max-height:calc(100vh - 40px); overflow:auto; border:1px solid rgba(255,255,255,.45); border-radius:22px; background:var(--card); box-shadow:0 30px 100px rgba(20,18,15,.28); transform:translateY(12px) scale(.98); transition:.22s ease; }
.modal-backdrop.open .modal { transform:none; }
.create-modal { padding:24px; }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; }
.modal-head h2 { margin:0; font-family:"Songti SC",serif; font-size:25px; }
.modal-close { width:36px; height:36px; box-shadow:none; }
.source-switch { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:5px; margin:22px 0 20px; border-radius:13px; background:#ece8e0; }
.source-tab { min-height:39px; display:flex; align-items:center; justify-content:center; gap:7px; color:var(--muted); border:0; border-radius:9px; background:transparent; cursor:pointer; font-size:11px; }
.source-tab svg { width:15px; }
.source-tab.active { color:var(--ink); background:var(--card); box-shadow:0 2px 8px rgba(30,25,20,.06); font-weight:600; }
.source-panel { display:none; }
.source-panel.active { display:block; animation:pageIn .2s ease both; }
.field-label { display:block; margin:14px 0 7px; color:var(--ink); font-size:11px; font-weight:600; }
.field-label span { color:var(--faint); font-weight:400; }
.input-wrap { min-height:46px; display:flex; align-items:center; gap:9px; padding:0 13px; border:1px solid var(--line-dark); border-radius:12px; background:white; }
.input-wrap svg { width:16px; color:var(--faint); }
.input-wrap input { min-width:0; flex:1; border:0; outline:0; background:none; font-size:11px; }
.plain-input, textarea { width:100%; border:1px solid var(--line-dark); border-radius:12px; background:white; outline:0; }
.plain-input { min-height:44px; padding:0 13px; font-size:11px; }
textarea { padding:13px; resize:vertical; font-size:11px; line-height:1.7; }
.field-help { margin:7px 2px 0; color:var(--faint); font-size:9px; line-height:1.5; }
.textarea-meta { display:flex; justify-content:space-between; margin-top:6px; color:var(--faint); font-size:8px; }
.consent { display:flex; align-items:flex-start; gap:9px; margin-top:18px; color:var(--muted); cursor:pointer; font-size:10px; line-height:1.55; }
.consent input { position:absolute; opacity:0; }
.checkmark { display:grid; place-items:center; width:18px; height:18px; flex:0 0 auto; color:transparent; border:1px solid var(--line-dark); border-radius:5px; background:white; }
.checkmark svg { width:12px; }
.consent input:checked + .checkmark { color:white; border-color:var(--red); background:var(--red); }
.inline-error { min-height:17px; margin-top:8px; color:var(--red); font-size:9px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; padding-top:17px; border-top:1px solid var(--line); }

.onboarding-modal { width:min(790px,100%); display:grid; grid-template-columns:.9fr 1.1fr; overflow:hidden; }
.onboarding-visual { position:relative; min-height:510px; display:flex; flex-direction:column; justify-content:flex-end; padding:33px; overflow:hidden; color:white; background:#292724; }
.onboarding-visual > p { position:relative; z-index:2; margin:30px 0 0; font-family:"Songti SC",serif; font-size:15px; line-height:1.8; }
.paper-stack { position:absolute; left:50%; top:37%; z-index:2; width:122px; height:160px; padding:18px; color:var(--ink); background:#e7e0d3; box-shadow:-12px 13px 0 #b7aea0, 13px -9px 0 #faf7ef; transform:translate(-50%,-50%) rotate(-5deg); }
.paper-stack::after { content:""; position:absolute; left:16px; right:16px; bottom:28px; height:1px; background:#aaa094; box-shadow:0 7px #aaa094,0 14px #aaa094; }
.paper-stack span { display:block; color:var(--red); font:8px Georgia,serif; letter-spacing:.2em; }
.paper-stack strong { display:block; margin-top:18px; color:var(--red); font:45px Georgia,serif; }
.paper-stack small { position:absolute; bottom:12px; right:15px; font:7px Georgia,serif; letter-spacing:.15em; }
.archive-orbit { position:absolute; border:1px solid rgba(255,255,255,.1); border-radius:50%; }
.orbit-one { width:340px; height:340px; left:-60px; top:-55px; }
.orbit-two { width:230px; height:230px; left:-5px; top:2px; box-shadow:0 0 0 45px rgba(255,255,255,.018); }
.onboarding-body { min-height:510px; padding:42px 37px; display:flex; flex-direction:column; }
.step-kicker { color:var(--red); font:9px Georgia,sans-serif; letter-spacing:.12em; }
.onboarding-body h2 { margin:9px 0 22px; font-family:"Songti SC",serif; font-size:25px; }
.setup-step { display:none; }
.setup-step.active { display:block; animation:pageIn .24s ease both; }
.choice-cloud { display:flex; flex-wrap:wrap; gap:7px; }
.choice { min-height:35px; padding:0 13px; color:var(--muted); border:1px solid var(--line); border-radius:18px; background:white; cursor:pointer; font-size:10px; }
.choice.active { color:var(--red-dark); border-color:#dbb5b0; background:var(--red-soft); }
.setup-preview { position:relative; padding:20px 17px 17px; border:1px solid var(--line); border-radius:13px; background:white; }
.setup-preview span { position:absolute; left:12px; top:-9px; padding:3px 8px; color:white; border-radius:10px; background:var(--red); font-size:8px; }
.setup-preview p { margin:0; font-family:"Songti SC",serif; font-size:15px; line-height:1.7; }
.palette-row { display:flex; align-items:center; gap:7px; padding:15px; border:1px solid var(--line); border-radius:13px; background:white; }
.palette-row i { width:25px; height:25px; border:1px solid rgba(0,0,0,.08); border-radius:50%; background:var(--c); }
.palette-row span { margin-left:6px; color:var(--muted); font-size:9px; }
.setup-dots { display:flex; justify-content:center; gap:6px; margin-top:auto; }
.setup-dots i { width:5px; height:5px; border-radius:50%; background:var(--line-dark); }
.setup-dots i.active { width:16px; border-radius:5px; background:var(--red); }
.setup-actions { display:flex; justify-content:space-between; margin-top:18px; }

.toast { position:fixed; left:50%; bottom:28px; z-index:200; display:flex; align-items:center; gap:9px; min-height:46px; padding:0 17px 0 9px; color:white; border-radius:24px; background:#292724; box-shadow:0 12px 35px rgba(0,0,0,.2); opacity:0; visibility:hidden; transform:translate(-50%,15px); transition:.24s ease; font-size:11px; }
.toast.show { opacity:1; visibility:visible; transform:translate(-50%,0); }
.toast-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--green); }
.toast-icon svg { width:14px; }

@media (max-width: 1180px) {
  :root { --sidebar: 86px; }
  .sidebar { padding-inline:14px; }
  .sidebar .brand > span:last-child, .nav-item span, .nav-item b, .mini-profile > span:nth-child(2), .mini-profile > svg { display:none; }
  .sidebar .brand { justify-content:center; padding:0; }
  .side-nav { margin-top:42px; }
  .nav-item { justify-content:center; padding:0; }
  .mini-profile { display:grid; place-items:center; padding:10px; }
  .home-grid { grid-template-columns:minmax(0,1fr) 285px; }
  .metrics { grid-template-columns:repeat(2,1fr); }
  .article-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 920px) {
  .home-grid { grid-template-columns:1fr; }
  .home-aside { grid-template-columns:1fr 1fr; }
  .home-aside .archive-tip { display:none; }
  .workspace-layout,.workspace-layout.wide-aside { grid-template-columns:1fr; }
  .side-stack { grid-template-columns:repeat(2,1fr); }
  .script-options { grid-template-columns:1fr; }
  .script-option { min-height:120px; }
  .asset-library-grid { grid-template-columns:repeat(3,1fr); }
  .profile-grid { grid-template-columns:1fr; }
}

@media (max-width: 720px) {
  :root { --radius:16px; }
  body { background:var(--paper); }
  .sidebar { display:none; }
  .main-canvas { margin-left:0; }
  .mobile-topbar { position:sticky; top:0; z-index:25; height:62px; padding:8px 15px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(214,208,197,.8); background:rgba(247,245,239,.9); backdrop-filter:blur(16px); }
  .mobile-topbar .brand { width:auto; padding:0; }
  .mobile-topbar .brand-mark { width:30px; height:32px; transform:scale(.83); transform-origin:left center; }
  .mobile-topbar .brand strong { font-size:15px; }
  .mobile-topbar .brand small { font-size:6px; }
  .mobile-topbar .icon-btn { width:37px; height:37px; }
  .page-host { min-height:calc(100vh - 62px); padding:22px 15px calc(92px + var(--safe-bottom)); }
  .bottom-nav { position:fixed; z-index:50; left:0; right:0; bottom:0; height:calc(66px + var(--safe-bottom)); padding:6px 12px var(--safe-bottom); display:grid; grid-template-columns:repeat(5,1fr); border-top:1px solid var(--line); background:rgba(249,247,242,.94); backdrop-filter:blur(18px); }
  .bottom-item { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--faint); border:0; background:none; font-size:9px; }
  .bottom-item svg { width:19px; height:19px; }
  .bottom-item.active { color:var(--red); font-weight:600; }
  .home-head { margin-bottom:19px; }
  .home-head .top-actions { display:none; }
  .page-title { font-size:28px; }
  .page-subtitle { font-size:11px; }
  .date-stamp { display:none; }
  .metrics { grid-template-columns:repeat(3,1fr); gap:7px; overflow:visible; }
  .metric-card { min-height:85px; padding:13px 11px; border-radius:14px; }
  .metric-card:nth-child(4) { grid-column:1/-1; min-height:69px; display:grid; grid-template-columns:1fr auto; align-items:center; }
  .metric-card:nth-child(4) .metric-value { margin-top:3px; }
  .metric-card small { font-size:9px; }
  .metric-value strong { font-size:22px; }
  .metric-foot { font-size:8px; }
  .hero-create { min-height:215px; padding:26px 22px; border-radius:20px; }
  .hero-create h2 { max-width:230px; font-size:24px; line-height:1.35; }
  .hero-create p { max-width:225px; font-size:10px; }
  .hero-create::before { right:-90px; }
  .hero-lines { display:none; }
  .quick-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
  .quick-card { min-height:67px; padding:11px; }
  .quick-icon { width:34px; height:34px; }
  .section-title { font-size:19px; }
  .project-row { grid-template-columns:42px minmax(0,1fr) auto; min-height:68px; gap:10px; padding:9px; }
  .project-index { width:40px; height:45px; }
  .project-row .progress-mini,.project-row .row-more { display:none; }
  .project-title strong { font-size:13px; }
  .status-pill { font-size:8px; }
  .home-aside { grid-template-columns:1fr; }
  .aside-card:last-child { display:none; }
  .page-toolbar { align-items:flex-start; margin-bottom:18px; }
  .page-toolbar .top-actions { flex-direction:column-reverse; align-items:stretch; }
  .page-toolbar .btn { min-height:40px; }
  .search-field { min-width:0; width:100%; }
  .article-grid { grid-template-columns:1fr; }
  .article-card { min-height:210px; }
  .workspace-top { margin-bottom:14px; }
  .workspace-title h1 { font-size:22px; }
  .workspace-title .status-pill { display:none; }
  .workspace-top > .top-actions .btn.ghost { display:none; }
  .workflow-strip { margin-inline:-15px; padding:13px 8px 10px; border-left:0; border-right:0; border-radius:0; scroll-snap-type:x proximity; }
  .workflow-strip::before { left:44px; right:44px; top:27px; }
  .step-button { min-width:63px; scroll-snap-align:center; }
  .step-dot { width:26px; height:26px; }
  .panel { border-radius:16px; }
  .panel-pad { padding:17px; }
  .panel-head { margin-bottom:16px; }
  .side-stack { grid-template-columns:1fr; }
  .side-card.rules-mobile-hide { display:none; }
  .recommend-banner { grid-template-columns:65px 1fr; gap:12px; padding:15px; }
  .score-ring { width:62px; height:62px; }
  .score-ring strong { font-size:21px; }
  .recommend-label { grid-column:1/-1; width:fit-content; }
  .analysis-columns { grid-template-columns:1fr; }
  .name-grid { grid-template-columns:repeat(2,1fr); gap:8px; }
  .name-card { min-height:139px; padding:13px; }
  .name-card h3 { font-size:19px; }
  .editor-tabs { display:flex; }
  .compare-grid { display:block; min-height:0; }
  .document-pane { min-height:420px; }
  .document-pane + .document-pane { border:0; }
  .document-pane.mobile-hidden { display:none; }
  .story-text { font-size:14px; }
  .word-count-strip { display:grid; grid-template-columns:1fr 1fr; }
  .asset-suggestions { grid-template-columns:1fr; }
  .asset-card { min-height:145px; display:grid; grid-template-columns:100px 1fr; gap:12px; }
  .asset-visual { grid-row:1/4; height:100%; min-height:105px; margin:0; }
  .asset-library-grid { grid-template-columns:repeat(2,1fr); }
  .shot-card { grid-template-columns:52px 1fr; }
  .shot-card .shot-block:nth-child(3) { grid-column:2; }
  .shot-card .retention { grid-column:2; }
  .check-summary { grid-template-columns:1fr; text-align:center; }
  .gauge { margin:auto; }
  .check-badges { justify-content:center; }
  .check-grid { grid-template-columns:1fr; }
  .final-preview { padding:27px 19px; }
  .final-preview h2 { font-size:23px; }
  .analytics-hero { grid-template-columns:1fr; }
  .review-grid { grid-template-columns:1fr; }
  .profile-grid { grid-template-columns:1fr; }
  .modal-backdrop { align-items:end; padding:0; }
  .modal { width:100%; max-height:92vh; border-radius:23px 23px 0 0; }
  .create-modal { padding:20px 17px calc(18px + var(--safe-bottom)); }
  .onboarding-modal { display:block; border-radius:23px 23px 0 0; }
  .onboarding-visual { min-height:190px; padding:21px; }
  .paper-stack { left:75%; top:45%; width:76px; height:100px; padding:10px; }
  .paper-stack strong { margin-top:9px; font-size:27px; }
  .paper-stack span,.paper-stack small { font-size:5px; }
  .onboarding-visual > p { margin:0; font-size:13px; }
  .archive-orbit { display:none; }
  .onboarding-body { min-height:390px; padding:27px 20px calc(20px + var(--safe-bottom)); }
  .toast { bottom:calc(79px + var(--safe-bottom)); }
}

@media (max-width: 400px) {
  .metrics { grid-template-columns:repeat(2,1fr); }
  .metric-card:nth-child(4) { grid-column:auto; display:block; }
  .quick-card small { display:none; }
  .name-grid { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; }
}
