/* ==================== 日记模块样式（时间轴版） ==================== */

/* 顶部工具条：左日历 / 中标题 / 右发布 */
.dy-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 12px;
}
.dy-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #E3E8F2;
  background: #fff;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2E3644;
  transition: .15s;
  padding: 0;
}
.dy-iconbtn:active { background: #F2F5FA; transform: scale(.95); }
.dy-pub {
  background: #2B5CE7;
  border-color: #2B5CE7;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}
.dy-pub:active { background: #1F4BCB; }
.dy-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: #1E2530;
  letter-spacing: .5px;
}

/* 统计条 */
.dy-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #5A6474;
  padding: 0 2px 12px;
}
.dy-stat b { color: #2B5CE7; font-size: 15px; font-weight: 800; }
.dy-dot { width: 3px; height: 3px; border-radius: 50%; background: #C9D0DB; }

/* ==================== 时间轴 ==================== */
.dy-list { padding-bottom: 20px; }

.dy-row {
  display: flex;
  gap: 0;
  cursor: pointer;
}
.dy-row:active .dy-card { background: #F7F9FC; transform: scale(.995); }

/* 左侧时间轴 */
.dy-axis {
  flex: 0 0 62px;
  position: relative;
  padding-top: 16px;
  text-align: right;
  padding-right: 12px;
}
.dy-ax-y {
  font-size: 10px;
  color: #B4BCC9;
  line-height: 1;
  letter-spacing: .3px;
}
.dy-ax-md {
  font-size: 14px;
  font-weight: 800;
  color: #2B5CE7;
  line-height: 1.3;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.dy-ax-hm {
  font-size: 11px;
  color: #8A93A0;
  line-height: 1.2;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
/* 竖线与圆点 */
.dy-ax-line {
  position: absolute;
  right: -1px;
  top: 20px;
  bottom: -4px;
  width: 2px;
  background: #E6EBF3;
  border-radius: 2px;
}
.dy-ax-line::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2B5CE7;
  box-shadow: 0 0 0 2px #fff;
}

/* 右侧日记卡片 */
.dy-card {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #E9EDF4;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(24,32,48,.05);
  transition: .15s;
  margin-left: 14px;
}
.dy-card-h {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.dy-card-t {
  font-size: 14px;
  font-weight: 700;
  color: #1E2530;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 正文截断：最多 3 行 */
.dy-card-b {
  font-size: 15px;
  font-weight: 600;
  color: #1E2530;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.dy-card-f {
  font-size: 10.5px;
  color: #B4BCC9;
  margin-top: 8px;
}

/* 追记标识 */
.dy-tag-rev {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  color: #B26A00;
  background: #FFF4E0;
  border: 1px solid #FFE0AC;
  border-radius: 5px;
  padding: 1px 5px;
  letter-spacing: .3px;
}
.dy-mood { flex: 0 0 auto; font-size: 14px; }

/* 末尾渐隐线 */
.dy-endline {
  height: 1px;
  background: linear-gradient(90deg, #E6EBF3, transparent);
  margin: 4px 0 0 76px;
}

/* ==================== 空态 / 登录态 ==================== */
.dy-empty, .dy-loading {
  text-align: center;
  padding: 56px 20px;
  color: #9AA3AF;
  font-size: 13px;
}
.dy-empty-ic { font-size: 38px; opacity: .55; margin-bottom: 12px; }
.dy-empty-t { line-height: 1.6; }
.dy-loading { padding: 32px; }

.dy-login {
  text-align: center;
  padding: 64px 24px;
}
.dy-login-t { font-size: 16px; font-weight: 700; color: #2E3644; }
.dy-login-d { font-size: 12.5px; color: #9AA3AF; margin: 8px 0 22px; }
.dy-login .btn {
  background: #2B5CE7;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ==================== 编辑器（写 / 改） ==================== */
.dy-save {
  border: none;
  background: #2B5CE7;
  color: #fff;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
}
.dy-save:active { background: #1F4BCB; }
.dy-save:disabled { opacity: .55; }

.dy-editor {
  background: #fff;
  border: 1px solid #E9EDF4;
  border-radius: 12px;
  padding: 14px;
}
.dy-ed-title {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 700;
  color: #1E2530;
  padding: 2px 0 10px;
  border-bottom: 1px solid #F0F3F8;
  background: transparent;
  box-sizing: border-box;
}
.dy-ed-title::placeholder { color: #C3C9D4; font-weight: 500; }
.dy-ed-mood {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
  flex-wrap: wrap;
}
.dy-ed-lb { font-size: 12px; color: #8A93A0; flex: 0 0 auto; }
.dy-ed-body {
  width: 100%;
  min-height: 260px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 14px;
  line-height: 1.8;
  color: #2E3644;
  padding: 10px 0;
  background: transparent;
  box-sizing: border-box;
  font-family: inherit;
}
.dy-ed-body::placeholder { color: #C3C9D4; }
.dy-ed-foot {
  text-align: right;
  font-size: 11px;
  color: #B4BCC9;
  padding-top: 6px;
  border-top: 1px solid #F0F3F8;
}
.dy-ed-hint {
  font-size: 11.5px;
  color: #B26A00;
  background: #FFF9EE;
  border: 1px solid #FFECC7;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
  line-height: 1.55;
}

/* 心情按钮选中态 */
.moodbtn.is-on {
  background: #EAF0FE !important;
  border-color: #2B5CE7 !important;
  box-shadow: 0 0 0 1px #2B5CE7 inset;
}

/* ==================== 单篇详情 ==================== */
.dy-item {
  background: #fff;
  border: 1px solid #E9EDF4;
  border-radius: 12px;
  padding: 16px;
}
.dy-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #9AA3AF;
  padding-bottom: 10px;
  border-bottom: 1px solid #F0F3F8;
}
.dy-rev-time { font-size: 10.5px; color: #B26A00; }
.dy-item-title {
  font-size: 18px;
  font-weight: 800;
  color: #1E2530;
  margin: 14px 0 10px;
  line-height: 1.4;
}
.dy-item-body {
  font-size: 14px;
  line-height: 1.9;
  color: #2E3644;
  white-space: pre-wrap;
  word-break: break-word;
}
.dy-item-foot {
  font-size: 11px;
  color: #B4BCC9;
  text-align: right;
  margin-top: 14px;
}

/* 追记历史 */
.dy-revs {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #E6EBF3;
}
.dy-revs-t {
  font-size: 12px;
  font-weight: 700;
  color: #8A93A0;
  margin-bottom: 10px;
}
.dy-rev-item {
  background: #FAFBFD;
  border-left: 2px solid #E0E5EF;
  border-radius: 0 8px 8px 0;
  padding: 9px 11px;
  margin-bottom: 8px;
}
.dy-rev-at { font-size: 10.5px; color: #B4BCC9; margin-bottom: 5px; }
.dy-rev-c {
  font-size: 12.5px;
  color: #6B7484;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==================== 日历弹层 ==================== */
.dy-mask {
  position: fixed;
  inset: 0;
  background: rgba(20,26,38,.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  box-sizing: border-box;
}
.dy-cal {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(20,26,38,.2);
}
.dy-cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dy-cal-ym { font-size: 15px; font-weight: 800; color: #1E2530; }
.dy-cal-nav {
  width: 30px;
  height: 30px;
  border: none;
  background: #F2F5FA;
  border-radius: 8px;
  font-size: 16px;
  color: #5A6474;
  cursor: pointer;
  line-height: 1;
}
.dy-cal-nav:active { background: #E6EBF3; }
.dy-cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.dy-cal-week span {
  text-align: center;
  font-size: 11px;
  color: #B4BCC9;
  padding: 4px 0;
}
.dy-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dy-cal-day {
  aspect-ratio: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  color: #2E3644;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: .12s;
}
.dy-cal-day:active { background: #EAF0FE; }
.dy-cal-day.is-today { color: #2B5CE7; font-weight: 800; }
.dy-cal-day.is-sel { background: #2B5CE7; color: #fff; font-weight: 700; }
.dy-cal-empty { aspect-ratio: 1; }
.dy-cal-f {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #F0F3F8;
}
.dy-cal-btn {
  flex: 1;
  border: 1px solid #E3E8F2;
  background: #fff;
  border-radius: 9px;
  padding: 9px 0;
  font-size: 13px;
  color: #2B5CE7;
  font-weight: 600;
  cursor: pointer;
}
.dy-cal-btn:active { background: #F2F5FA; }
.dy-cal-cancel { color: #8A93A0; }

/* ===== write page ===== */
.dy-write-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px;
}
.dy-w-back {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #2E3644;
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
}
.dy-w-back:active { background: #EFF2F7; }
.dy-w-when {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.dy-w-today {
  font-size: 17px;
  font-weight: 800;
  color: #1E2530;
}
.dy-w-date {
  font-size: 12.5px;
  color: #9AA3AF;
}
.dy-w-save {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  color: #2B5CE7;
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
}
.dy-w-save:active { background: #EAF0FE; }
.dy-w-save:disabled { opacity: .45; }
.dy-w-body {
  background: #fff;
  border-radius: 14px;
  padding: 4px 16px 16px;
  min-height: 58vh;
  box-shadow: 0 1px 3px rgba(20, 40, 90, .05);
}
.dy-w-text {
  width: 100%;
  min-height: 54vh;
  border: none;
  outline: none;
  resize: none;
  font-size: 15.5px;
  line-height: 1.85;
  color: #1E2530;
  background: transparent;
  font-family: inherit;
  padding: 12px 0 0;
  box-sizing: border-box;
}
.dy-w-text::placeholder { color: #B6BEC9; }
.dy-w-foot {
  text-align: right;
  font-size: 11.5px;
  color: #B6BEC9;
  padding: 10px 4px 0;
  font-variant-numeric: tabular-nums;
}

/* ===== card tags ===== */
.dy-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ===== item page ===== */
.dy-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px;
}
.dy-item-acts {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dy-w-del {
  border: none;
  background: transparent;
  color: #E5484D;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
}
.dy-w-del:active { background: #FDECEC; }
.dy-w-del:disabled { opacity: .45; }
.dy-item-revtime {
  font-size: 11.5px;
  color: #B26A00;
  margin-top: 10px;
}

/* 只读正文：直接作为主体，无标题 */
.dy-item-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: #1E2530;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 4px;
}
.dy-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #9AA3AF;
  padding-bottom: 12px;
  border-bottom: 1px solid #F0F3F8;
  margin-bottom: 14px;
}
.dy-item-foot {
  text-align: right;
  font-size: 11.5px;
  color: #B6BEC9;
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
}
