.desk{max-width:740px;margin:auto;background:#f6f9ff;min-height:100dvh;box-shadow:var(--shadow);--type-scale:1.25}
.mast{display:flex;align-items:center;justify-content:space-between;padding:5px 18px;background:#fff;border-bottom:1px solid var(--line)}
.mast>a{font-size:18px;font-weight:800;color:var(--brand-deep)}.mast div{display:flex;align-items:center;gap:12px}
.mast div a,.mast button{font-size:14px;color:var(--brand-deep)}.mast button,dialog header button{border:0;background:#eff4ff;border-radius:9px;padding:0 12px;min-height:44px}
#app{padding-bottom:94px}.screen{min-height:0}.desk .tabbar{position:fixed;inset:auto 0 0;margin:auto;width:min(100%,740px);height:auto;min-height:64px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:4px 3px max(5px,env(safe-area-inset-bottom));background:#fff;z-index:5}
.desk .tab{background:none;border:0;display:grid;place-content:center;justify-items:center;gap:3px;min-height:46px;color:#52637f;font-size:12px}
.desk .tab svg{width:20px;height:20px}.desk .tab.is-active{color:var(--brand-deep);font-weight:800}
.page-head{padding:16px}.page-head-row,.source-links,.actions,.filter-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.page-head-row{justify-content:space-between}.page-head h1{font-size:24px;margin:0}.page-head p{margin:4px 0;color:#4f627c}.head-actions{display:flex;gap:8px}.head-actions svg,.quick-action svg{width:20px;height:20px}
.desk button:focus-visible,dialog :focus-visible,a:focus-visible{outline:3px solid #2769c9;outline-offset:2px}
.source-links{margin:7px 0}.source-links a,.actions button,.picker button,.filter-row button,.term-button,.reader-link{background:white;border:1px solid #d4e1f6;color:#234b87;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 12px;cursor:pointer}
.desk .week-nav-btn,.desk .day-add,.desk .day-plan-new,.desk .day-plan-empty{min-height:44px}

/* 旧版排期卡的按钮与筛选标签。 */
.mini-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #e1ebf9;
  border-radius: 8px;
  color: #51647e;
  font-weight: 700;
}
.mini-btn.blue { color: #245cda; border-color: #cfe1ff; background: #f2f7ff; }
.mini-btn.danger { color: #b93d51; border-color: #f6d7dc; background: #fff7f8; }
.desk .week-detail-days { gap: 18px; }
.desk .day-plan-card.has-topics { padding: 0; }
.has-topics .day-plan-head {
  justify-content: flex-start;
  padding: 8px clamp(14px, 3vw, 22px);
  border-bottom: 1px solid var(--line);
}
.has-topics .day-plan-title { min-height: 38px; gap: 10px; }
.has-topics .day-plan-district { font-size: 13px; }
.has-topics .day-plan-date { font-size: 14px; color: #52647e; }
.desk .manage-card { padding: clamp(14px, 3vw, 22px); }
.desk .day-plan-card .manage-card { border: 0; background: transparent; }
.desk .manage-info { gap: 16px; }
.desk .card-topline { margin: 0; }
.desk .card-district { font-size: 13px; }
.desk .manage-title-row { gap: 8px; }
.manage-title-row .drag-handle { height: 28px; }
.desk .manage-title-row h3 {
  display: block; overflow: visible; overflow-wrap: anywhere; text-wrap: balance;
  font-size: clamp(19px, 3vw, 22px); line-height: 1.45;
}
.manage-card .status-badge { margin-top: 3px; font-size: 13px; line-height: 1.45; padding: 2px 7px; }
.topic-brief.with-reference {
  display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  gap: clamp(14px, 3vw, 24px);
}
.topic-reference { min-width: 0; margin: 0; align-self: start; }
.picture-frame {
  position: relative; display: block; width: 100%; overflow: hidden; padding: 0; border: 0;
  border-radius: 10px; background: transparent;
}
button.picture-frame { cursor: zoom-in; }
.picture-frame img { display: block; width: 100%; height: auto; }
.picture-watermark {
  position: absolute; top: 60%; left: 50%; transform: translate(-50%,-50%) rotate(-15deg);
  color: rgb(255 255 255 / 90%); font: 700 clamp(19px,4vw,34px)/1.3 var(--font);
  white-space: nowrap; letter-spacing: .14em; text-shadow: 0 1px 4px #203043, 0 0 1px #203043;
  pointer-events: none; user-select: none;
}
.topic-reference figcaption { margin-top: 6px; font-size: 13px; line-height: 1.5; color: #52647e; }
.topic-reference figcaption:has(.picture-choice) { display: flex; flex-wrap: wrap; gap: 2px 7px; }
.picture-choice {
  min-height: 36px; padding: 4px 1px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: #52647e; font: 500 14px/1.4 var(--font); cursor: pointer;
}
.picture-choice[aria-pressed="true"] { color: var(--brand-deep); border-bottom-color: currentColor; font-weight: 700; }
.topic-brief-copy { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.topic-brief-copy .special-badge { align-self: flex-start; }
.topic-brief-copy p {
  margin: 0; color: var(--ink-2); font-size: 17px; line-height: 1.8;
  white-space: pre-line; overflow-wrap: anywhere; text-wrap: pretty;
}
.topic-resources { display: grid; }
.source-label { display: inline-flex; align-items: center; gap: 7px; }
.source-label .source-icon { width: 19px; height: 19px; flex: none; color: #ef8e19; }
.source-label .source-icon-fileText { color: #078752; }
.source-links { gap: 4px 8px; }
.topic-resources .source-links { display: flex; justify-content: space-between; align-items: center; margin: 0; border-top: 1px solid var(--line); }
.topic-resources .source-links > :is(a,button) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0;
  border: 0; background: transparent; color: #27579a; font: 500 15px/1.4 var(--font);
}
.topic-resources .source-links .source-label { gap: 5px; white-space: nowrap; }
.topic-resources .source-links > :is(a,button):hover { text-decoration: underline; }
.topic-narrative .special-badge { display: inline-block; margin-bottom: 6px; }
.work-progress { min-width: 0; width: 100%; margin: 0; padding: 13px 0 0; border: 0; border-top: 1px solid var(--line); }
.work-progress:disabled { opacity: .7; }
.work-total, .work-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.work-total { min-height: 30px; margin-bottom: 6px; font-size: 17px; }
.work-total b { color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.work-progress progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 9px; overflow: hidden; background: #dce8ff; color: #2863fa; appearance: none; }
.work-progress progress::-webkit-progress-bar { background: #dce8ff; }
.work-progress progress::-webkit-progress-value { background: #2863fa; border-radius: 9px; }
.work-progress progress::-moz-progress-bar { background: #2863fa; border-radius: 9px; }
.work-total + progress { height: 9px; margin-bottom: 10px; }
.work-track { padding: 9px 0 12px; border-top: 1px solid var(--line); }
.work-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; min-height: 42px; white-space: nowrap; cursor: pointer; }
.work-toggle input { width: 18px; height: 18px; margin: 0; accent-color: #2863fa; cursor: pointer; }
.work-progress select { font: inherit; color: var(--ink-2); background-color: white; cursor: pointer; }
.work-progress .work-editor { min-width: 0; max-width: 50%; min-height: 38px; border: 1px solid #c6d7f4; border-radius: 7px; padding: 4px 5px; font-size: 15px; }
.work-stage { color: #4f627d; font-size: 14px; font-variant-numeric: tabular-nums; }
.work-stage select { max-width: 75%; min-height: 36px; padding: 2px 1px; border: 0; }
.work-progress :is(input,select):focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.topic-resources > :is(a,button) {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 7px 3px; border: 0; border-top: 1px solid var(--line);
  background: transparent; color: #27579a; font-size: 15px; text-align: left;
}
.topic-resources > :is(a,button)::after {
  content: ''; width: 7px; height: 7px; margin-right: 3px;
  border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.desk .manage-card .manage-actions {
  flex-wrap: wrap; gap: 8px; margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line);
}
.desk .manage-card .mini-btn {
  min-height: 46px; padding: 7px 12px; font-size: 17px; font-weight: 650; line-height: 1.4; white-space: nowrap;
}
dialog .picture-frame { width: fit-content; max-width: 100%; margin: 12px auto 0; }
dialog .picture-frame img { width: auto; max-width: 100%; max-height: 68dvh; }
dialog .topic-reference figcaption { text-align: center; justify-content: center; }
@media (max-width: 365px) {
  .topic-brief.with-reference { grid-template-columns: 1fr; }
  .topic-reference { width: min(85%, 225px); justify-self: center; }
  .topic-reference figcaption { text-align: center; }
}
@media (max-width: 530px) {
  .topic-brief.with-reference:has(.work-progress) {
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    grid-template-areas: "picture narrative" "production production" "resources resources";
    gap: 14px;
  }
  .topic-brief.with-reference:has(.work-progress) .topic-reference { grid-area: picture; width: 100%; }
  .topic-brief.with-reference:has(.work-progress) .topic-brief-copy { display: contents; }
  .topic-brief.with-reference .topic-narrative { grid-area: narrative; }
  .topic-brief.with-reference .work-progress { grid-area: production; }
  .topic-brief.with-reference:has(.work-progress) .topic-resources { grid-area: resources; }
}
.desk .manage-filters .chip {
  min-height: 30px; border: 1px solid #e2ecfa; border-radius: 999px;
  padding: 5px 12px; background: #fff; color: #52647e; font-weight: 600;
}
.desk .manage-filters .chip.is-active { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.library-sections { display: flex; gap: 24px; padding: 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.library-sections button { min-height: 44px; padding: 0 4px; border: 0; border-bottom: 3px solid transparent; background: none; color: #54667d; }
.library-sections [aria-current] { border-color: var(--brand-deep); color: var(--brand-deep); font-weight: 700; }
.leads-panel { padding: 0 16px 18px; }
.lead-heading, .lead-map-bar, .lead-map-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lead-heading { margin: 12px 0; }
.lead-heading h2 { margin: 0; font-size: 21px; }
.lead-route, .lead-map-foot button { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--brand-deep); font-size: 15px; font-weight: 650; }
.lead-map-foot svg { width: 15px; height: 15px; }
.lead-search { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #bdcfe8; border-radius: 10px; background: #fff; font-size: 16px; }
.lead-categories { display: flex; gap: 3px 4px; flex-wrap: wrap; margin: 7px 0 10px; }
@media (max-width: 380px) {
  .lead-categories { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
}
.lead-categories button { min-height: 44px; min-width: 44px; padding: 0 8px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 15px; color: #52647e; font-variant-numeric: tabular-nums; }
.lead-categories [aria-pressed="true"] { border-bottom-color: var(--brand-deep); color: var(--brand-deep); font-weight: 750; }
.lead-map, .lead-list { background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.lead-map { padding: 0 clamp(10px, 2.6vw, 18px); }
.lead-map-bar { padding-top: 14px; }
.lead-map-bar h3 { margin: 0; font-size: 17px; }
.lead-map .map-wrap { max-width: 520px; margin: 6px auto; }
.lead-map .map-district:focus-visible path { stroke: #102e69; stroke-width: 2px; }
.lead-map-foot { border-top: 1px solid var(--line); color: #52647e; font-size: 14px; }
.lead-scope { margin: 16px 0 0; color: #53647e; font-size: 14px; line-height: 1.65; }
.lead-scope summary { cursor: pointer; padding-block: 10px; }
.lead-scope p { margin: 0 0 8px; }
.lead-count, .lead-source { color: #53647e; font-size: 14px; }
.lead-list-bar { margin: 15px 0 9px; color: #53647e; font-size: 14px; }
.lead-empty { margin: 0; padding: 16px; color: #52647e; background: #fff; border-radius: 12px; }
.lead-item { display: grid; gap: 5px; width: 100%; padding: 12px 16px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; }
.lead-item:first-child { border-top: 0; }
.lead-item span { font-size: 14px; color: #53647e; }
.lead-last-date { color: #67778c; font-size: 13px; font-variant-numeric: tabular-nums; }
.lead-last-date.published { color: #0b6a54; }
.lead-history { margin: 18px 0; }
.lead-history h3 { margin: 0 0 6px; font-size: 16px; }
.lead-history p { margin: 0; color: #53647e; }
.lead-history-item {
  display: grid; grid-template-columns: minmax(0,1fr) 18px; gap: 4px 12px;
  align-items: center; width: 100%; min-height: 48px; padding: 10px 2px;
  border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); text-align: left;
}
.lead-history-item time { grid-column: 1; color: #0b6a54; font-size: 14px; font-variant-numeric: tabular-nums; }
.lead-history-item span { grid-column: 1; font-size: 16px; overflow-wrap: anywhere; }
.lead-history-item svg { grid-column: 2; grid-row: 1 / 3; width: 16px; height: 16px; color: #53647e; }
.lead-detail p { line-height: 1.7; white-space: pre-line; }
.lead-source a { text-decoration: underline; }
.lead-detail .primary-btn { padding-inline: 16px; }
@media (hover: hover) {
  .manage-card button.mini-btn:hover { border-color: currentColor; }
  .topic-resources > :is(a,button):hover { color: var(--brand-deep); text-decoration: underline; }
}
@media (pointer: coarse) {
  .desk .manage-filters .chip { min-height: 40px; }
}
.drag-over{outline:2px dashed #276bff;outline-offset:-2px}.sheet,.filter-row{padding:0 16px 12px}.filter-row input,.picker input{width:100%}
.term-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.term-button{flex-direction:column;gap:3px;min-height:80px}.term-button small,.term-button span,.subtle{font-size:12px;color:#506079}.term-button.has{background:#edf6ff;border-color:#a8c8ff}
dialog{width:min(500px,calc(100vw - 24px));max-height:86dvh;overflow:auto;border:1px solid var(--line);border-radius:20px;padding:18px;color:var(--ink);box-shadow:var(--shadow)}
dialog::backdrop{background:#13244073}dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px}dialog h2{font-size:20px;margin:0}dialog header button{font-size:24px}
dialog form{display:grid;gap:12px;margin-top:14px}dialog label{display:grid;gap:4px;font-size:14px;font-weight:650}
dialog input,dialog select,dialog textarea,.filter-row input,.picker input{width:100%;min-height:44px;padding:9px;border:1px solid #b8c8df;border-radius:8px;background:#fff;font:inherit}
dialog textarea{min-height:84px}dialog .primary-btn{min-height:44px;background:var(--brand-deep);color:#fff;border:0;border-radius:10px}
dialog .poster{max-height:50dvh;max-width:100%;object-fit:contain;margin:auto}dialog video{width:100%;max-height:50dvh}
.picker{display:grid;gap:8px;margin-top:12px}.picker button{justify-content:flex-start;text-align:left}#error{color:#a52927}#error:empty{display:none}#notice{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);z-index:10;padding:8px 16px;border-radius:10px;background:#233956;color:white}
.library-list,.week-list,.week-detail-days,.sheet{overflow-wrap:anywhere}.desk .manage-info{width:100%}.op-role-chip{max-width:45%;overflow-wrap:anywhere}.desk .op-hero{padding-top:20px}.desk .op-stat small{color:#52647e}.blank{padding:20px;color:#506079}
@media(max-width:420px){.desk{--type-scale:1.12}.op-stats{gap:5px}.manage-actions{row-gap:6px}}


.desk .screen{animation:none}
[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.desk *,dialog *{animation:none!important;transition:none!important}}

.published-list {
  display: grid;
  gap: 14px;
  padding: 0 16px 20px;
}
.published-card {
  display: grid;
  grid-template-columns: minmax(0, 33%) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.published-poster {
  grid-row: span 2;
  align-self: start;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.published-poster img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 9 / 16;
  object-fit: contain;
}
.published-copy { min-width: 0; padding-top: 5px; }
.published-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #576b88; }
.published-meta > span { border-left: 1px solid #d4dfed; padding-left: 8px; }
.published-copy h2 { margin: 8px 0; font-size: clamp(16px, 3vw, 21px); line-height: 1.45; }
.published-copy h2 button {
  padding: 0; border: 0; background: none; text-align: left;
  color: var(--ink); font: inherit; overflow-wrap: anywhere;
}
.published-copy p {
  margin: 0; color: #52647c; font-size: 14px; line-height: 1.75;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; overflow-wrap: anywhere;
}
.published-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  border-top: 1px solid #e8edf5; padding-top: 4px;
}
.published-actions .source-links { justify-content: space-between; flex-basis: 100%; margin: 0; }
.published-actions button, .published-actions a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0;
  background: none; border: 0; color: #2158a1; font: 600 13px/1.4 var(--font);
}
.published-actions button:last-child { margin-left: auto; color: #4e6078; }
.published-card.text-only { grid-template-columns: minmax(0,1fr); }
.published-actions :is(button,a):hover, .published-copy h2 button:hover { text-decoration: underline; }
@media (max-width: 500px) {
  .published-list { padding-inline: 12px; }
  .published-card { grid-template-columns: minmax(0, 43%) minmax(0,1fr); gap: 9px 13px; padding: 12px; }
  .published-poster { grid-row: auto; }
  .published-actions { grid-column: 1 / -1; }
  .published-copy p { font-size: 13px; }
  .published-actions :is(a,button) { min-height: 44px; }
}
