/* =========================================
   1. 语义化主容器：极致信纸质感
   ========================================= */
letter {
  display: block;
  position: relative;
  width: 100%; /* 加宽：撑满容器可用宽度 */
  box-sizing: border-box; /* 确保内边距不撑破宽度 */
  background-color: #FDFBF7;
  background-image: 
    linear-gradient(rgba(208, 90, 110, 0.15) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.015) 1px, transparent 1px);
  background-size: 100% 28px, 3px 3px;
  background-position: 0 40px, 0 0;
  border: 1px solid #E6D5D8;
  border-radius: 2px 15px 2px 2px;
  padding: 35px 25px 20px 25px;
  margin: 15px 0; /* 修改margin配合100%宽度 */
  box-shadow: 
    2px 5px 15px rgba(0, 0, 0, 0.05),
    inset 0 0 40px rgba(230, 200, 205, 0.1);
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; /* 更换为微软雅黑 */
  color: #3A2528;
  line-height: 1.8;
  overflow: hidden;
}
/* 顶部胶带装饰效果 */
letter::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 120px;
  height: 25px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  backdrop-filter: blur(2px);
  z-index: 10;
}
/* =========================================
   2. 语义化头部：信件时间与地点
   ========================================= */
letter header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid rgba(208, 90, 110, 0.3);
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #8C4351;
  letter-spacing: 1px;
}
/* =========================================
   3. 语义化正文：排版优化
   ========================================= */
letter article {
  font-size: 15px;
  text-align: justify;
}
letter article p {
  margin: 0 0 14px 0;
  text-indent: 2em;
}
/* =========================================
   4. 语义化侧边/底部栏：状态面板
   ========================================= */
letter aside details {
  background: rgba(255, 248, 250, 0.8);
  border-left: 4px solid #D05A6E;
  padding: 12px 15px;
  margin-top: 20px;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 8px rgba(208, 90, 110, 0.08);
}
letter aside summary {
  cursor: pointer;
  font-weight: bold;
  color: #8C4351;
  font-size: 14px;
  outline: none;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
}
letter aside summary::before {
  content: "📝";
  margin-right: 8px;
  font-size: 16px;
}
/* 面板内部列表重置 */
letter aside ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  font-size: 13px;
  color: #5D3F46;
}
letter aside li {
  margin-bottom: 8px;
}
letter aside li strong {
  color: #A55A68;
}
/* =========================================
   5. 状态可视化：美化 HTML5 Meter 进度条
   ========================================= */
.status-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 15px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
}
.status-grid label {
  font-weight: bold;
  color: #8C4351;
  font-size: 12px;
  text-align: right;
}
letter meter {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: #E8D3D6;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
/* 进度条底色 */
letter meter::-webkit-meter-bar {
  background: #F4DBDE;
  border: none;
  border-radius: 5px;
}
/* 默认进度条填充色 */
letter meter::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, #FFB7C5, #D05A6E);
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(208, 90, 110, 0.4);
}
letter meter::-moz-meter-bar { 
  background: linear-gradient(90deg, #FFB7C5, #D05A6E);
  border-radius: 5px;
}
/* 理智值特殊颜色 */
letter meter.sanity::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, #A0D8EF, #4B8EAD);
  box-shadow: 0 0 5px rgba(75, 142, 173, 0.4);
}
letter meter.sanity::-moz-meter-bar { 
  background: linear-gradient(90deg, #A0D8EF, #4B8EAD);
}