/* ============ 倒数日 + 相册（计时器页内板块） ============ */
.days-wrap { max-width: 520px; margin: 0 auto; }

/* ---------- 喜欢天数卡片 ---------- */
.days-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 26px 22px 22px;
  text-align: center;
  color: #fff;
  background: linear-gradient(140deg, #ff8fab 0%, #f0416f 55%, #d92e5c 100%);
  box-shadow: 0 18px 38px rgba(240, 65, 111, .28);
}
.days-card::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -60px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}
.days-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  letter-spacing: .5px;
  opacity: .95;
}
.days-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 4px;
  font-variant-numeric: tabular-nums;
}
.days-number span:first-child {
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 0 6px 18px rgba(160, 20, 55, .28);
}
.days-unit { font-size: 18px; font-weight: 600; opacity: .92; }
.days-since { font-size: 13px; opacity: .9; margin-top: 6px; }
.days-set {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  color: #e8305f;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(150, 20, 50, .18);
}
.days-set:active { transform: translateY(1px); }
.days-date {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

/* ---------- 相册列表 ---------- */
.album-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 30px 2px 12px;
}
.album-head h3 { margin: 0; font-size: 17px; color: #4a3b41; }
.album-head span { font-size: 12px; color: #a48b94; }

.album-usage {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 14px;
  font-size: 11px;
  color: #a48b94;
}
.album-usage-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #ffe3ec;
  overflow: hidden;
}
.album-usage-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffa8c0, #f0416f);
  transition: width .35s ease;
}
.album-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #a48b94;
  font-size: 13px;
  padding: 40px 10px;
  background: #fff8fa;
  border: 1.5px dashed #ffd6e2;
  border-radius: 18px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.album-tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ffe3ec;
  box-shadow: 0 8px 20px rgba(240, 65, 111, .1);
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
}
.album-cover {
  height: 108px;
  background: linear-gradient(140deg, #ffe3ec, #ffd0dd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #ffa8c0;
  overflow: hidden;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-meta { padding: 10px 12px 12px; }
.album-name {
  font-size: 14px;
  font-weight: 600;
  color: #4a3b41;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-count { font-size: 11px; color: #a48b94; margin-top: 3px; }

.album-new {
  border: 1.5px dashed #ffb3c9;
  background: #fff8fa;
  border-radius: 20px;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #f0416f;
  font-size: 13px;
  cursor: pointer;
}
.album-new b { font-size: 26px; font-weight: 500; line-height: 1; }
.album-new:active { background: #ffeef4; }

/* ---------- 相册详情 ---------- */
.album-view { max-width: 520px; margin: 0 auto; }
.album-view-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.album-view-head h3 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  color: #4a3b41;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-icon-btn {
  border: 0;
  background: #fff;
  color: #f0416f;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(240, 65, 111, .12);
}
.album-icon-btn.danger { color: #8a8a8a; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #ffe3ec;
  cursor: pointer;
  padding: 0;
  border: 0;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 16px;
  border: 1.5px dashed #ffb3c9;
  background: #fff8fa;
  color: #f0416f;
  font-size: 14px;
  cursor: pointer;
}
.photo-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #a48b94;
  font-size: 13px;
  padding: 34px 0;
}

/* ---------- 命名弹层 ---------- */
.days-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(60, 30, 42, .42);
}
.days-modal[hidden] { display: none; }
.days-modal-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 50px rgba(120, 20, 60, .24);
}
.days-modal-card h4 { margin: 0 0 14px; font-size: 16px; color: #4a3b41; }
.days-modal-card input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ffd6e2;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  color: #4a3b41;
}
.days-modal-card input:focus { border-color: #ff8fab; }
.days-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.days-modal-actions button {
  flex: 1;
  border: 0;
  border-radius: 12px;
  padding: 11px;
  font-size: 14px;
  cursor: pointer;
}
#modalCancel { background: #f6f1f3; color: #7a6a70; }
#modalOk { background: linear-gradient(135deg, #ff8fab, #f0416f); color: #fff; }

/* ---------- 大图预览 ---------- */
.days-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(20, 8, 14, .92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.days-lightbox[hidden] { display: none; }
.days-lightbox img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 14px;
  object-fit: contain;
}
.lightbox-bar { display: flex; gap: 10px; margin-top: 18px; }
.lightbox-bar a,
.lightbox-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, .18);
}
.lightbox-bar a { background: #f0416f; }
.lightbox-bar button.danger { color: #ffb3c1; }

/* ---------- 自定义倒数日 ---------- */
.days-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.days-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #ffe3ec;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 8px 18px rgba(240, 65, 111, .08);
}
.days-item-emoji { font-size: 24px; flex-shrink: 0; }
.days-item-main { flex: 1; min-width: 0; }
.days-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #4a3b41;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.days-item-date { font-size: 11.5px; color: #a48b94; margin-top: 4px; }
.days-item-count {
  flex-shrink: 0;
  font-size: 12px;
  color: #f0416f;
  background: #fff0f4;
  border-radius: 999px;
  padding: 5px 11px;
  font-variant-numeric: tabular-nums;
}
.days-item-count b { font-size: 16px; }
.days-item-count.past { color: #8f8f98; background: #f4f4f6; }
.days-item-count.today { color: #fff; background: linear-gradient(135deg, #ff8fab, #f0416f); }
.days-item-del {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: #ffe3ec;
  color: #d43a63;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s ease;
}
.days-item:hover .days-item-del { opacity: 1; }

.days-add {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1.5px dashed #ffb3c9;
  background: #fff8fa;
  color: #f0416f;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.days-add:active { background: #ffeef4; }
.days-add:disabled { cursor: not-allowed; opacity: .55; }
.days-add[hidden] { display: none; }
.days-add-tip { font-size: 11px; color: #a48b94; font-weight: 400; }

/* ---------- 新增倒数日表单 ---------- */
.days-form {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #ffe3ec;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(240, 65, 111, .1);
}
.days-form[hidden] { display: none; }
.days-form-row { display: flex; gap: 10px; }
.days-form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #8a7780;
}
.days-form-field input {
  border: 1px solid #ffd6e2;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 13px;
  color: #4a3b41;
  background: #fffafb;
  outline: none;
  font-family: inherit;
}
.days-form-field input:focus { border-color: #ff8fab; }
.days-form-emoji { flex: 0 0 74px; }
.days-form-actions { display: flex; gap: 10px; margin-top: 12px; }
.days-form-save,
.days-form-cancel {
  flex: 1;
  border: 0;
  border-radius: 12px;
  padding: 11px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.days-form-save { background: linear-gradient(135deg, #ff8fab, #f0416f); color: #fff; }
.days-form-cancel { background: #f6f1f3; color: #7a6a70; }

@media (max-width: 480px) {
  .sub-tabs { gap: 4px; padding: 5px; }
  .sub-tab { font-size: 11.5px; letter-spacing: 0; padding: 9px 2px; }
  .days-number span:first-child { font-size: 64px; }
  .days-item-del { opacity: .9; }
  .days-item-emoji { font-size: 20px; }
  .days-form-row { flex-wrap: wrap; }
  .days-form-emoji { flex: 0 0 62px; }
}
