.fortune-history-dialog{
  border:none;
  border-radius:24px;
  padding:0;
  max-width:760px;
  width:min(94vw,760px);
  background:linear-gradient(180deg,#fffefb 0%, #fffdfa 100%);
  color:#0f172a;
  box-shadow:0 36px 100px rgba(15,23,42,.24);
}
.fortune-history-card{
  padding:24px;
  display:grid;
  gap:16px;
}
.fortune-history-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.fortune-history-title{
  font-size:16px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#8a6d3b;
}
.fortune-history-close{
  border:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.88);
  color:#334155;
  border-radius:999px;
  width:34px;
  height:34px;
  cursor:pointer;
  box-shadow:0 8px 16px rgba(15,23,42,.06);
}
.fortune-history-error{
  padding:12px 14px;
  border-radius:14px;
  background:#fef2f2;
  border:1px solid rgba(239,68,68,.2);
  color:#991b1b;
  font-size:13px;
}
.fortune-history-loading{
  font-size:13px;
  color:#64748b;
  padding:18px 4px;
  text-align:center;
}
.fortune-history-list{
  display:grid;
  gap:14px;
}
.fortune-history-card{
  border:1px solid rgba(199,164,106,.22);
  border-radius:22px;
  padding:16px 18px;
  background:linear-gradient(180deg,#fffdf7 0%, #ffffff 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}
.fortune-history-summary{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  cursor:pointer;
  list-style:none;
}
.fortune-history-summary::-webkit-details-marker{
  display:none;
}
.fortune-history-left{
  display:grid;
  gap:8px;
  min-width:0;
  flex:1;
}
.fortune-history-dayline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.fortune-history-date{
  font-size:14px;
  color:#0f172a;
  font-weight:700;
}
.fortune-history-phum{
  font-size:12px;
  color:#8a6d3b;
  font-weight:700;
  letter-spacing:.04em;
}
.fortune-history-summary-meta{
  display:flex;
  align-items:flex-start;
  gap:8px;
}
.fortune-history-badge{
  font-size:11px;
  font-weight:700;
  padding:6px 10px;
  border-radius:999px;
  background:#e2e8f0;
  color:#334155;
  white-space:nowrap;
}
.fortune-history-badge.is-done{
  background:#dcfce7;
  color:#166534;
}
.fortune-history-badge.is-pending{
  background:#fef9c3;
  color:#854d0e;
}
.fortune-history-badge.is-missing{
  background:#e2e8f0;
  color:#475569;
}
.fortune-history-body{
  margin-top:14px;
  font-size:12px;
  color:#475569;
  display:grid;
  gap:10px;
}
.fortune-history-preview{
  font-size:18px;
  line-height:1.55;
  color:#0f172a;
  font-weight:700;
  letter-spacing:-.02em;
}
.fortune-history-empty{
  padding:24px 18px;
  border-radius:18px;
  background:rgba(255,255,255,.7);
  border:1px dashed rgba(148,163,184,.22);
  color:#64748b;
  text-align:center;
}
.fortune-history-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.fortune-history-chip{
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  color:#8a6d3b;
  background:#fff9ef;
  border:1px solid rgba(199,164,106,.18);
  border-radius:999px;
  padding:6px 10px;
}
.fortune-history-row{
  display:grid;
  gap:6px;
  padding:12px 13px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(148,163,184,.12);
}
.fortune-history-row.is-summary{
  background:linear-gradient(180deg,#fffdf6 0%, #ffffff 100%);
  border-color:rgba(199,164,106,.18);
}
.fortune-history-row.is-task{
  background:linear-gradient(180deg,#f4fff8 0%, #ffffff 100%);
  border-color:rgba(34,197,94,.16);
}
.fortune-history-row.is-ritual{
  background:linear-gradient(180deg,#f8fbff 0%, #ffffff 100%);
  border-color:rgba(59,130,246,.12);
}
.fortune-history-row-title{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#8a6d3b;
}
.fortune-history-row-text{
  font-size:13px;
  line-height:1.72;
  color:#334155;
}
.fortune-history-actions{
  display:flex;
  gap:10px;
  margin-top:6px;
}
.fortune-history-share{
  border:1px solid rgba(148,163,184,.22);
  border-radius:999px;
  padding:10px 14px;
  font-size:12px;
  font-weight:700;
  color:#334155;
  background:#fff;
  cursor:pointer;
}
.fortune-history-view{
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  padding:10px 14px;
  font-size:12px;
  font-weight:700;
  color:#fff;
  background:linear-gradient(135deg,#0f172a,#1e3a8a);
  cursor:pointer;
  box-shadow:0 10px 22px rgba(30,58,138,.16);
}
.fortune-history-share:active{
  transform:scale(.98);
}

@media (max-width: 640px){
  .fortune-history-dialog{
    width:min(96vw, 760px);
    border-radius:20px;
  }
  .fortune-history-card{
    padding:18px 16px;
  }
  .fortune-history-summary{
    gap:12px;
  }
  .fortune-history-preview{
    font-size:16px;
  }
  .fortune-history-actions{
    flex-direction:column;
  }
  .fortune-history-view,
  .fortune-history-share{
    width:100%;
  }
}

.fortune-share-wrap{
  position:fixed;
  left:-99999px;
  top:0;
  z-index:-1;
  padding:12px;
  background:#ffffff;
}
.fortune-share-card{
  width:520px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.2);
  background:#fff;
  color:#0f172a;
  overflow:hidden;
  font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
}
.share-brandbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(148,163,184,.2);
}
.share-brandleft{
  display:flex;
  align-items:center;
  gap:10px;
}
.share-brandbar img{
  width:22px;
  height:22px;
  border-radius:6px;
  object-fit:cover;
}
.share-brandname{
  font-weight:700;
  font-size:13px;
}
.share-brandsite{
  font-size:11px;
  opacity:.7;
}
.fortune-share-body{
  padding:12px 14px 16px;
}
.fortune-share-head{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  color:#475569;
}
.fortune-share-date{
  font-weight:600;
  color:#0f172a;
}
.fortune-share-phum{
  font-weight:600;
  color:#334155;
}
.fortune-share-status{
  padding:2px 8px;
  border-radius:999px;
  background:#e2e8f0;
  color:#1f2937;
  font-size:11px;
}
.fortune-share-task{
  margin-top:10px;
  font-weight:700;
  font-size:14px;
  color:#0f172a;
}
.fortune-share-row{
  margin-top:8px;
  font-size:12px;
  color:#334155;
  line-height:1.6;
}
.share-line{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.share-line.clamp-4{
  -webkit-line-clamp:4;
}
