* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #f7f6f3;
  min-height: 100dvh;
  color: #2e2d33;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 168px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.daylabel { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: #2e2d33; }
.ph { width: 44px; }
.iconbtn.small {
  height: 26px; padding: 0 10px; border-radius: 8px;
  background: rgba(0,0,0,0.04); color: #8b8790; font-size: 11px;
  display: flex; align-items: center; text-decoration: none;
}

.weekstrip {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 10px 8px; background: rgba(255,255,255,0.4);
}
.wday {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 0; border-radius: 12px; cursor: pointer;
}
.wday .dow { font-size: 9px; color: #b8b3ba; letter-spacing: 0.5px; }
.wday .dnum {
  font-size: 13px; color: #3a3940; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.wday.today .dnum { background: #2e2d33; color: #fff; }
.wday .dots { display: flex; gap: 2px; height: 4px; }
.wday .dots span { width: 4px; height: 4px; border-radius: 50%; }

.daymeta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 16px 6px;
}
#dayTitle { font-size: 15px; font-weight: 700; color: #2e2d33; }
.count { font-size: 11px; color: #b8b3ba; }

.feed { padding: 8px 16px 6px; display: flex; flex-direction: column; gap: 12px; }
.empty { text-align: center; color: #c4c0c8; font-size: 12.5px; padding: 40px 0; }

.entry-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 16px; padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.045);
}
.entry-card.assistant { border-color: rgba(160,140,180,0.15); }
.entry-head { display: flex; justify-content: space-between; align-items: center; }
.entry-author { font-size: 11px; font-weight: 600; color: #726d78; }
.entry-time { font-size: 9.5px; color: #c4c0c8; }
.entry-moods { display: flex; gap: 5px; margin-top: 6px; }
.mood-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; padding: 2px 8px; border-radius: 7px; background: rgba(0,0,0,0.045); color: #726d78; }
.entry-content { font-size: 13.5px; line-height: 1.65; color: #3a3940; margin-top: 8px; white-space: pre-wrap; }
.entry-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.comment-count { font-size: 10.5px; color: #b8b3ba; }

.entry-card.locked {
  background: repeating-linear-gradient(135deg, rgba(0,0,0,0.03) 0 8px, rgba(0,0,0,0.055) 8px 16px);
}
.locked-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: #8b8790; }
.locked-until { font-size: 10px; color: #c4c0c8; margin-top: 6px; }

.comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.05); display: none; }
.comments.open { display: block; }
.comment-item { font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
.comment-item .ca { font-weight: 600; color: #726d78; margin-right: 6px; }
.comment-reply { display: flex; gap: 6px; margin-top: 8px; }
.comment-reply input {
  flex: 1; border: 1px solid rgba(0,0,0,0.06); border-radius: 10px;
  padding: 6px 10px; font-size: 12px; background: rgba(255,255,255,0.6); outline: none;
}
.comment-reply button {
  border: none; border-radius: 10px; padding: 6px 12px; font-size: 11.5px;
  background: #2e2d33; color: #fff;
}

.composer {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}
.mood-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 8px; }
.mood-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 0; border-radius: 10px; cursor: pointer; position: relative;
}
.mood-opt .em { display: flex; align-items: center; justify-content: center; color: #726d78; }
.mood-opt.sel .em { color: #2e2d33; }
.mood-opt .lb { font-size: 8.5px; color: #b8b3ba; }
.mood-opt.sel { background: rgba(0,0,0,0.05); }
.mood-opt.sel .lb { color: #2e2d33; }
.mood-opt .badge {
  position: absolute; top: -2px; right: 6px; font-size: 8px;
  width: 12px; height: 12px; border-radius: 50%; background: #2e2d33; color: #fff;
  display: flex; align-items: center; justify-content: center;
}

.seal-row { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; }
.seal-opt {
  flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08); border-radius: 10px;
  padding: 5px 11px; font-size: 11px; color: #726d78; background: rgba(255,255,255,0.5);
}
.seal-opt.sel { background: #2e2d33; color: #fff; border-color: #2e2d33; }

.input-row { display: flex; align-items: flex-end; gap: 8px; }
#entryInput {
  flex: 1; border: 1px solid rgba(0,0,0,0.06); border-radius: 14px;
  padding: 9px 12px; font-size: 13.5px; font-family: inherit; color: #2e2d33;
  background: rgba(255,255,255,0.6); outline: none; resize: none; max-height: 90px;
}
#entryInput::placeholder { color: #c4c0c8; }
.seal-toggle {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.05); font-size: 14px; flex-shrink: 0;
}
.seal-toggle.on { background: #2e2d33; filter: invert(1); }
.send-btn {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: #2e2d33; color: #fff; font-size: 15px; flex-shrink: 0;
}

.custom-seal { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 8px; padding: 8px 4px; }
.cs-field { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cs-field input {
  width: 46px; text-align: center; border: 1px solid rgba(0,0,0,0.08); border-radius: 8px;
  padding: 5px 0; font-size: 13px; font-family: inherit; background: rgba(255,255,255,0.6); outline: none;
}
.cs-field label { font-size: 9px; color: #b8b3ba; }
#csConfirm { border: none; border-radius: 10px; padding: 7px 14px; font-size: 11.5px; background: #2e2d33; color: #fff; }

/* 封缄详情页 */
.seal-detail {
  position: fixed; inset: 0; z-index: 60;
  background: #f7f6f3;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 30px;
}
.sd-top { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.sd-top #sdClose { border: none; background: rgba(0,0,0,0.05); width: 32px; height: 32px; border-radius: 50%; font-size: 15px; color: #2e2d33; }
.sd-date { font-size: 14px; font-weight: 700; color: #2e2d33; }
.sd-top .ph { width: 32px; }

.sd-icon {
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; color: #2e2d33;
  margin-top: 40px;
}
.sd-label { font-size: 12px; letter-spacing: 6px; color: #8b8790; margin-top: 18px; }
.sd-desc { font-size: 15px; color: #2e2d33; text-align: center; line-height: 1.7; margin-top: 22px; max-width: 280px; }

.sd-countdown { display: flex; align-items: baseline; gap: 6px; margin-top: 34px; background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 16px 22px; }
.sd-unit { display: flex; flex-direction: column; align-items: center; }
.sd-unit span { font-size: 32px; font-weight: 700; color: #2e2d33; font-variant-numeric: tabular-nums; }
.sd-unit label { font-size: 9.5px; color: #b8b3ba; margin-top: 2px; }
.sd-colon { font-size: 24px; color: #d8d4da; align-self: flex-start; margin-top: 4px; }

.sd-until { font-size: 11.5px; color: #b8b3ba; margin-top: 16px; }
.sd-notify {
  margin-top: 26px; border: none; border-radius: 14px; padding: 10px 18px;
  font-size: 12.5px; color: #726d78; background: rgba(0,0,0,0.045);
}
.sd-notify.on { background: #2e2d33; color: #fff; }
