/* 开发日志（js/filecopy.js）：一叠档案副本摊在屏幕正中，上边一排日期签，收起来缩到右下角。2026-11-19 从 desktop.css 拆出来。 */

/* ── 开发日志：一叠档案副本 ── */
.fc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(18 22 18 / 0);
  transition: background 0.25s;
}

.fc-overlay.shown {
  background: rgb(18 22 18 / 0.42);
}

.fc-stack {
  position: relative;
  width: min(600px, calc(100vw - 48px));
  height: min(820px, calc(100vh - 90px));
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.18s, translate 0.25s steps(4);
}

.fc-overlay.shown .fc-stack {
  opacity: 1;
  translate: 0 0;
}

/* 一张纸：灰白的旧纸 + 一点纸纹；红酒渍是 filecopy.js 按日期画的 SVG（.fc-wine） */
.fc-page {
  --ink: #2f2a24;
  --pen: #b0142a;
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 26px 28px 22px;
  color: var(--ink);
  background-color: #e9e4d6;
  background-image:
    radial-gradient(circle at 18% 12%, rgb(150 120 90 / 0.07), transparent 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 1px rgb(80 60 40 / 0.25), 6px 8px 0 rgb(0 0 0 / 0.28);
  transform: translate(calc(var(--dx) * var(--depth) * 0.45), calc(var(--dy) * var(--depth) * 0.35)) rotate(calc(var(--rot) * min(var(--depth), 1) + var(--depth) * 0.2deg));
  transition: transform 0.32s cubic-bezier(0.3, 0.7, 0.3, 1), filter 0.2s;
  user-select: text;
}

.fc-page.front {
  transform: rotate(-0.4deg);
}

/* 压在后面的：暗一点，只有露出来的纸边能点；指上去往外抽出一截 */
.fc-page.back {
  cursor: pointer;
  filter: brightness(0.93);
  user-select: none;
}

.fc-page.back > * {
  pointer-events: none;
}

.fc-wine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* 瓦伦缇娜的红笔：批注写在段落底下的空当里，被批的那段左边划一道 */
.fc-body p.fc-marked {
  position: relative;
}

.fc-body p.fc-marked::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 3px;
  bottom: 5px;
  width: 2px;
  background: var(--pen);
  rotate: 1.5deg;
  opacity: 0.85;
}

.fc-note {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: 78%;
  margin: -4px 0 10px;
  color: var(--pen);
  line-height: 1.6;
  text-indent: 0;
  mix-blend-mode: multiply;
}

.fc-note::before {
  content: '↖ ';
}

.fc-note i,
.fc-slip i {
  display: inline-block;
  font-style: normal;
}

/* 她贴在纸上的字条：一张从便笺本撕下来的纸，上面压一截胶带 */
.fc-slip {
  position: absolute;
  left: -180px; /* 连内边距一共 200 宽：只压住纸边的留白（本人：字条偶尔挡住正文——原来 -118，伸进来 82 点，盖住正文头两三个字） */
  bottom: 170px;
  z-index: 3;
  width: 176px;
  padding: 14px 12px 8px;
  background: #f6f1e4 repeating-linear-gradient(transparent 0 17px, rgb(120 140 170 / 0.25) 17px 18px);
  background-position: 0 9px;
  box-shadow: 2px 3px 0 rgb(0 0 0 / 0.18);
  color: var(--pen);
  font-family: var(--px);
  font-size: 12px;
  line-height: 18px;
  transition: opacity 0.2s;
}

.fc-slip::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 70px;
  height: 18px;
  translate: -50% 0;
  rotate: 3deg;
  background: rgb(230 220 180 / 0.7);
  box-shadow: 0 0 0 1px rgb(160 140 100 / 0.2);
}

.fc-slip p {
  margin: 0;
}

.fc-slip b {
  display: block;
  font-weight: normal;
  text-align: right;
}

/* 压在后面的那几张不露字条，免得一桌子都是 */
.fc-page.back .fc-slip {
  opacity: 0;
}

.fc-page.back:hover {
  filter: brightness(1);
  transform: translate(calc(var(--dx) * (var(--depth) * 0.45 + 1.6)), calc(var(--dy) * (var(--depth) * 0.35 + 1))) rotate(calc(var(--rot) * 1.3));
}

/* 点了：整张抽出来，再盖回最上面 */
.fc-page.pulling {
  transform: translate(calc(var(--dx) * 7), calc(var(--dy) * 2 - 30px)) rotate(calc(var(--rot) * 2));
  transition-duration: 0.2s;
  z-index: 200 !important;
}

.fc-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 92px;
  font-family: var(--px);
  font-size: 12px;
  letter-spacing: 1px;
  color: #4a4238;
}

.fc-dept {
  line-height: 1.55;
}

/* 涂黑的字 */
.fc-redact {
  display: inline-block;
  height: 0.95em;
  vertical-align: -0.1em;
  background: #141210;
  transform: skewX(-6deg);
  box-shadow: 1px 0 0 #141210;
}

.fc-conf {
  margin-top: 30px;
  margin-left: auto;
  padding: 2px 10px;
  border: 3px solid #c23a30;
  color: #c23a30;
  font-family: var(--px);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 2px;
  opacity: 0.82;
  rotate: -2deg;
  mix-blend-mode: multiply;
}

.fc-seal {
  flex: none;
  width: 92px;
  height: 92px;
  margin-top: -8px;
  color: #5a4a3a;
  opacity: 0.75;
  mix-blend-mode: multiply;
}

.fc-seal .stamp {
  position: static;
  width: 100%;
  height: 100%;
  rotate: var(--rot);
}

/* 框起来的那块：任务简报 */
.fc-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  border: 1.5px solid #2f2a24;
}

.fc-watermark {
  position: absolute;
  top: 18%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--px);
  font-size: 48px;
  color: rgb(90 80 70 / 0.22);
  rotate: -7deg;
  pointer-events: none;
}

.fc-scroll {
  position: relative;
  height: 100%;
  overflow: auto;
  padding: 12px 18px 110px;
  box-sizing: border-box;
  font-family: var(--px);
  font-size: 12px;
  line-height: 2;
}

.fc-meta {
  font-family: var(--px);
  font-size: 12px;
  letter-spacing: 1px;
}

.fc-meta span {
  font-weight: normal;
  color: #6a5f50;
}

.fc-page h3 {
  margin: 10px 0 2px;
  font-size: 24px;
  font-weight: normal;
  line-height: 1.35;
}

.fc-dek {
  margin: 0 0 12px;
  color: #6a5f50;
}

.fc-body p {
  margin: 0 0 8px;
  text-indent: 2em;
}

.fc-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 12px;
}

/* 截图像夹在档案上的照片 */
.fc-shots figure {
  width: 150px;
  margin: 0;
  padding: 5px 5px 2px;
  background: #f7f3ea;
  box-shadow: 2px 3px 0 rgb(0 0 0 / 0.2);
  rotate: -1.2deg;
}

.fc-shots figure:nth-child(even) {
  rotate: 1.5deg;
}

.fc-shots button {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  cursor: zoom-in;
}

.fc-shots img {
  display: block;
  width: 140px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  filter: sepia(0.35) contrast(1.05);
}

.fc-shots button:hover img {
  filter: none;
}

.fc-shots figcaption {
  font-size: 12px;
  line-height: 1.5;
  color: #5a5040;
}

.fc-inner {
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px dashed #8e2a23;
  background: rgb(200 60 50 / 0.06);
}

.fc-inner b {
  color: #8e2a23;
  font-family: var(--px);
  font-weight: normal;
  letter-spacing: 2px;
}

.fc-inner p {
  margin: 4px 0 0;
}

.fc-foot {
  margin-top: 10px;
  color: #6a5f50;
  font-size: 12px;
}

.fc-topsecret {
  position: absolute;
  right: 22px;
  bottom: 14px;
  padding: 3px 12px;
  border: 4px double #c23a30;
  color: #c23a30;
  font-family: var(--px);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 3px;
  opacity: 0.78;
  rotate: -5deg;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* 档案袋：更早的几期 */
.fc-folder {
  position: absolute;
  left: max(12px, calc(50% - 300px - 150px));
  bottom: 28px;
  width: 128px;
  height: 92px;
  min-width: 0;
  padding: 26px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  background: linear-gradient(#c49563, #b78653);
  box-shadow: inset 0 2px 0 #d9ad7c, 4px 5px 0 rgb(0 0 0 / 0.3);
  color: #3a2a1a;
  font-family: var(--px);
  text-align: left;
  cursor: pointer;
  rotate: -4deg;
  transition: rotate 0.15s steps(2), translate 0.15s steps(2);
}

/* 袋子的翻盖 */
.fc-folder::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 54px;
  height: 12px;
  background: #b78653;
  clip-path: polygon(0 100%, 10% 0, 90% 0, 100% 100%);
}

.fc-folder:hover {
  rotate: -1deg;
  translate: 0 -4px;
}

.fc-folder b {
  font-size: 12px;
  font-weight: normal;
  letter-spacing: 2px;
}

.fc-folder small {
  margin-top: 4px;
  font-size: 12px;
}

.fc-drawer {
  position: absolute;
  left: max(12px, calc(50% - 300px - 150px));
  bottom: 132px;
  width: 280px;
  max-height: 50vh;
  overflow: auto;
  background: #efe6d2;
  box-shadow: 0 0 0 2px #2c1d11, 5px 5px 0 rgb(0 0 0 / 0.3);
  z-index: 300;
}

.fc-drawer-head {
  padding: 6px 10px;
  background: #b78653;
  color: #2c1d11;
  font-family: var(--px);
  letter-spacing: 1px;
}

.fc-drawer ul {
  margin: 0;
  padding: 4px;
  list-style: none;
}

.fc-drawer button {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 6px;
  width: 100%;
  min-height: 0;
  padding: 5px 6px;
  border: 0;
  background: none;
  box-shadow: none;
  color: #2c1d11;
  font-family: var(--px);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.fc-drawer button:hover {
  background: #e3d4b0;
}

.fc-drawer span {
  font-family: var(--px);
  color: #6a5f50;
}

.fc-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  margin: 0;
  color: #d9d2bf;
  font-family: var(--px);
  font-size: 12px;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

/* 一叠纸上边的日期签：最近七期，红的那枚是正在看的这一期（filecopy.js 的 syncTabs） */
.fc-tabs {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(50% - min(410px, 50vh - 45px) - 36px);
  display: flex;
  align-items: flex-end;
  gap: 4px;
  translate: -50% 0;
}

.fc-tabs button {
  display: flex;
  flex: none; /* 窄屏上不挤扁，整排横着滑 */
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  padding: 5px 9px 6px;
  border: 0;
  border-radius: 0;
  background: #cfc7b3;
  box-shadow: 2px 2px 0 rgb(0 0 0 / 0.3);
  color: #3a2a1a;
  font-family: var(--px);
  font-size: 12px;
  line-height: 1.2;
  text-shadow: none;
  white-space: nowrap;
  cursor: pointer;
}

.fc-tabs button:hover {
  background: #e9e4d6;
}

.fc-tabs button:active {
  padding: 5px 9px 6px;
}

.fc-tabs b {
  font-weight: normal;
}

.fc-tabs small {
  font-size: 12px;
  opacity: 0.65;
}

.fc-tabs button.on {
  padding-bottom: 10px;
  background: #b0142a;
  color: #f3ecdc;
  cursor: default;
}

/* 窄屏：纸铺满一点，档案袋挪到左上角，日期签排在它右边、能横着滑 */
@media (max-width: 700px) {
  .fc-tabs {
    left: 124px;
    right: 10px;
    top: 62px;
    overflow-x: auto;
    padding-bottom: 4px;
    translate: 0 0;
    scrollbar-width: none;
  }

  .fc-stack {
    width: calc(100vw - 28px);
    height: calc(100vh - 200px);
  }

  .fc-hint {
    display: none;
  }

  .fc-page {
    padding: 16px 14px 14px;
  }

  .fc-head {
    min-height: 70px;
    font-size: 11px;
  }

  .fc-conf {
    font-size: 12px;
    margin-top: 22px;
  }

  .fc-seal {
    width: 62px;
    height: 62px;
  }

  .fc-folder {
    left: 10px;
    top: 32px;
    bottom: auto;
    width: 104px;
    height: 70px;
    padding-top: 18px;
  }

  .fc-drawer {
    left: 10px;
    top: 112px;
    bottom: auto;
  }

  .fc-topsecret {
    font-size: 12px;
  }

  .fc-scroll {
    padding-bottom: 24px;
  }
}

/* 纸左边没留够一张字条的地方（窗口不到 960 点宽）：字条不挂在纸外，排到框底下、纸的下沿那截 */
@media (max-width: 960px) {
  .fc-slip {
    position: relative;
    left: 6px;
    bottom: 0;
    flex: none;
    width: min(60%, 260px);
    margin: 18px 0 -8px; /* 不往框里压（字条还歪着，一角会翘上去）（原来 -16，盖住框里最下面那行字），框让出这块地方 */
  }
}

/* 开发日志的批注：塞梅尔维斯的蓝黑钢笔，瓦伦缇娜的红笔；回别人的那条挂在底下 */
.fc-note.by-s,
.fc-slip.by-s {
  color: #2b3a5a;
}

.fc-body p.fc-marked.mk-s::before {
  background: #2b3a5a;
}

.fc-note.re {
  margin-top: -8px;
}

.fc-note.re::before {
  content: '↳ ';
}
