/* ============================================================
 * day.css — 工作日页面
 * 页眉 · 赠语 · 三态清单(划去/朱砂警示/流光免除) · 日结日记
 * ============================================================ */

/* ---------- 页眉 ---------- */
.page-head { text-align: center; padding-top: 4px; }
.date-title {
  font-size: 19px;
  letter-spacing: .14em;
  font-weight: 500;
}
.field-tag {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-60);
  letter-spacing: .22em;
}
.field-tag::before {
  content: '◆';
  color: var(--cinnabar);
  font-size: 8px;
  vertical-align: 2px;
  margin-right: 8px;
}
.field-tag:empty { display: none; }
.head-rule {
  margin: 12px auto 0;
  width: 72%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ink-45) 20%, var(--ink-45) 80%, transparent);
  position: relative;
}
.head-rule::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -2.5px;
  width: 6px;
  height: 6px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--paper-card);
  border: 1px solid var(--ink-45);
}

/* ---------- 赠语 ---------- */
.blessing {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 4px;
  max-width: 92%;
}
.blessing-deco {
  color: var(--cinnabar);
  font-size: 15px;
  opacity: .8;
  flex: none;
}
.blessing-text {
  font-size: 14.5px;
  letter-spacing: .1em;
  line-height: 1.9;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px dotted var(--ink-25);
  padding-bottom: 2px;
  transition: color .3s, border-color .3s;
  text-align: center;
}
.blessing-text:hover { color: var(--cinnabar-deep); border-color: var(--cinnabar); }
.blessing-text.copied { animation: blessCopied .7s ease; }
.like-btn {
  font-size: 16px;
  color: var(--ink-45);
  flex: none;
  transition: color .3s, transform .3s;
  padding: 2px 4px;
  align-self: center;
}
.like-btn:hover { color: var(--cinnabar); }
.like-btn.liked { color: var(--cinnabar); }
.like-btn.pop { animation: heartPop .5s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------- 免除横幅 ---------- */
.exempt-banner {
  margin: 14px auto 0;
  padding: 9px 12px;
  text-align: center;
  font-size: 13.5px;
  letter-spacing: .22em;
  color: var(--cinnabar);
  border: 1px solid rgba(176, 58, 46, .4);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.exempt-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 250, 230, .8) 48%, rgba(201, 162, 39, .18) 52%, transparent 70%);
  background-size: 240% 100%;
  animation: flowLight 3.2s linear infinite;
  pointer-events: none;
}
.exempt-star { color: var(--gold); letter-spacing: 0; }

/* ---------- 清单 ---------- */
.items {
  list-style: none;
  margin-top: 16px;
}
.item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px 10px 6px;
  border-bottom: 1px dashed var(--ink-15);
  border-radius: 2px;
  position: relative;
  transition: background .35s ease, opacity .35s ease;
  overflow: hidden;
  cursor: pointer;
}
.item:last-child { border-bottom-color: transparent; }

/* 状态按钮 */
.state-btn {
  width: 24px;
  height: 24px;
  flex: none;
  border: 1.3px solid var(--ink);
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: transparent;
  position: relative;
  margin-top: 1px;
  transition: all .3s ease;
}
.state-btn::before {
  content: '';
  position: absolute;
  inset: -9px;
}

/* 条目主体 */
.item-body {
  flex: 1;
  display: flex;
  align-items: baseline;
  min-width: 0;
}
.no {
  flex: none;
  width: 1.7em;
  font-size: 14px;
  color: var(--ink-60);
}
.strike-wrap {
  flex: 1;
  position: relative;
  font-size: 15.5px;
  line-height: 1.7;
  letter-spacing: .05em;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
}
/* 划去线 */
.strike-wrap::after {
  content: '';
  position: absolute;
  left: -2px;
  right: 100%;
  top: 52%;
  height: 1.4px;
  background: var(--ink);
  opacity: 0;
  transition: right .5s cubic-bezier(.6, .05, .3, 1), opacity .2s;
  pointer-events: none;
}

/* 输入区 */
.item-input {
  border: none;
  border-bottom: 1px solid var(--ink-45);
  background: transparent;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: 1.4;
  padding: 0 4px 1px;
  width: 7.5em;
  min-width: 60px;
  transition: border-color .3s;
  border-radius: 0;
}
.item-input:focus { border-bottom-color: var(--cinnabar); }
.item-input.full-line { flex: 1; width: auto; }
.item-input::placeholder { color: var(--ink-25); letter-spacing: .1em; }
.strike-wrap .text { white-space: pre-wrap; }
.strike-wrap .text + .item-input, .item-input + .text { margin-left: 6px; }
.item-input + .text { margin-left: 6px; }

/* ===== 状态: 完成 —— 整段划去 + 暗淡 ===== */
.item.st-done { opacity: .5; }
.item.st-done .strike-wrap::after { right: -2px; opacity: .85; }
.item.st-done .state-btn {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.item.st-done .item-input { color: var(--ink-60); }

/* ===== 状态: 未完成 —— 朱砂底 + 黄色感叹号警报 ===== */
.item.st-undone {
  background: var(--cinnabar-soft);
  box-shadow: inset 2.5px 0 0 var(--cinnabar);
}
.item.st-undone .state-btn {
  border-color: var(--alarm);
  color: var(--alarm);
  font-weight: 700;
  animation: alarmPulse 1.6s ease-in-out infinite;
}
.item.st-undone .no { color: var(--cinnabar); }

/* ===== 状态: 被免 —— 彩色划掉 + 流光 ===== */
.item.st-exempt { opacity: .82; }
.item.st-exempt .strike-wrap::after {
  right: -2px;
  opacity: 1;
  height: 2px;
  background: linear-gradient(90deg, #b03a2e, #c9a227, #3a6ea5, #4a7c59, #b03a2e);
  background-size: 300% 100%;
  animation: rainbowSlide 3s linear infinite;
}
.item.st-exempt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 252, 240, .65) 50%, transparent 65%);
  background-size: 260% 100%;
  animation: flowLight 2.8s linear infinite;
  pointer-events: none;
}
.item.st-exempt .state-btn {
  border-color: var(--gold);
  color: var(--cinnabar);
}
.item.st-exempt .strike-wrap { color: var(--ink-60); }

/* ---------- 日结 / 日记 ---------- */
.diary { margin-top: 30px; }
.diary-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--ink-60);
  margin-bottom: 12px;
}
.diary-rule { flex: 1; height: 1px; background: var(--ink-15); }
.diary-input {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--ink-25);
  border-radius: 2px;
  background: transparent;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.9em;
  letter-spacing: .05em;
  resize: none;
  overflow: hidden;
  transition: border-color .3s;
  background-image: repeating-linear-gradient(
    transparent 0,
    transparent calc(1.9em - 1px),
    var(--ink-15) calc(1.9em - 1px),
    var(--ink-15) 1.9em
  );
  background-attachment: local;
  background-position: 0 10px;
}
.diary-input:focus { border-color: var(--ink-60); }
.diary-input::placeholder { color: var(--ink-25); letter-spacing: .12em; }
