/* 和鸣：记录一次分歧的 AI 引导界面。 */
.harmony-entry-sheet {
  width: min(680px, calc(100vw - 20px));
  height: min(90dvh, 820px);
  max-height: min(90dvh, 820px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: #493f46;
  background: #fbf9fa;
  box-shadow: 0 28px 80px rgba(48, 35, 42, .3);
}

.harmony-entry-dialog-body {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.harmony-guide-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.harmony-guide-head small {
  color: #7463c1;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.harmony-guide-head h2 {
  margin: 3px 0 2px;
  font-family: serif;
  font-size: 25px;
}

.harmony-guide-head p {
  margin: 0;
  color: #8b7f86;
  font-size: 9px;
}

.harmony-guide-head button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #776b72;
  background: #f0eaed;
  font-size: 20px;
}

.harmony-guide-privacy {
  flex: 0 0 auto;
  margin: 11px 0 9px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(101, 82, 175, .12);
  border-radius: 14px;
  background: linear-gradient(135deg, #f1edff, #fff);
}

.harmony-guide-privacy > span {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}

.harmony-guide-privacy p {
  margin: 0;
  color: #756d79;
  font-size: 8px;
  line-height: 1.5;
}

.harmony-guide-progress {
  flex: 0 0 auto;
  padding: 5px 1px 9px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.harmony-guide-progress::-webkit-scrollbar { display: none; }

.harmony-guide-progress span {
  min-width: 54px;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #aaa0a6;
}

.harmony-guide-progress i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a1959d;
  background: #eee9ec;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.harmony-guide-progress b {
  max-width: 62px;
  overflow: hidden;
  font-size: 7px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harmony-guide-progress span.active { color: #6554b3; }
.harmony-guide-progress span.active i {
  color: #fff;
  background: linear-gradient(145deg, #806fd0, #6250b0);
  box-shadow: 0 4px 10px rgba(98, 80, 176, .22);
}
.harmony-guide-progress span.done { color: #5e796f; }
.harmony-guide-progress span.done i { color: #fff; background: #6c9184; }

.harmony-guide-chat {
  flex: 1 1 auto;
  min-height: 170px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #e7e0e4;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #faf7f9);
}

.harmony-guide-message {
  max-width: 88%;
  align-self: flex-start;
}

.harmony-guide-message.user { align-self: flex-end; }
.harmony-guide-message.pending { opacity: .72; }

.harmony-guide-message small {
  display: block;
  margin: 0 4px 4px;
  color: #9a8e95;
  font-size: 7px;
}

.harmony-guide-message.user small { text-align: right; }

.harmony-guide-message > div {
  padding: 10px 11px;
  border-radius: 15px 15px 15px 5px;
  color: #554b51;
  background: #efebee;
  font-size: 9px;
  line-height: 1.75;
  word-break: break-word;
}

.harmony-guide-message.user > div {
  border-radius: 15px 15px 5px 15px;
  color: #fff;
  background: linear-gradient(145deg, #7a69c8, #6150ae);
}

.harmony-guide-recorded {
  flex: 0 0 auto;
  max-height: 185px;
  margin-top: 8px;
  overflow: auto;
  border: 1px solid #e6dfe3;
  border-radius: 16px;
  background: #fff;
}

.harmony-guide-recorded summary {
  padding: 10px 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #655b61;
  font-size: 8px;
  cursor: pointer;
  list-style: none;
}

.harmony-guide-recorded summary::-webkit-details-marker { display: none; }
.harmony-guide-recorded summary b { color: #6655b3; }

.harmony-guide-recorded dl {
  margin: 0;
  padding: 0 11px 3px;
  display: grid;
  gap: 7px;
}

.harmony-guide-recorded dl > div {
  padding: 8px 9px;
  border-radius: 11px;
  background: #f8f5f7;
}

.harmony-guide-recorded dt {
  color: #8d7c85;
  font-size: 7px;
  font-weight: 900;
}

.harmony-guide-recorded dd {
  margin: 3px 0 0;
  color: #554a50;
  font-size: 8px;
  line-height: 1.6;
}

.harmony-guide-recorded blockquote {
  margin: 8px 11px 0;
  padding: 9px 10px;
  border-left: 3px solid #7563c0;
  border-radius: 4px 10px 10px 4px;
  color: #5e5361;
  background: #f2effb;
  font-size: 8px;
  line-height: 1.6;
}

.harmony-guide-recorded blockquote small {
  display: block;
  margin-bottom: 3px;
  color: #6f5db9;
  font-weight: 900;
}

.harmony-guide-recorded > p {
  margin: 8px 11px 10px;
  color: #9a8d94;
  font-size: 7px;
}

.harmony-guide-form {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 7px;
}

.harmony-guide-form textarea {
  box-sizing: border-box;
  width: 100%;
  height: 54px;
  min-height: 54px;
  margin: 0 !important;
  padding: 10px 11px !important;
  border: 1px solid #ded6db !important;
  border-radius: 14px !important;
  color: #4f464b;
  background: #fff !important;
  font-size: 9px;
  line-height: 1.5;
  resize: none;
}

.harmony-guide-form button {
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #7867c6, #5d4bab);
  font-size: 9px;
  font-weight: 900;
}

.harmony-guide-form :disabled { opacity: .55; }

.harmony-guide-actions {
  flex: 0 0 auto;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.harmony-guide-actions button {
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  color: #8c7d85;
  background: #f0ebee;
  font-size: 7px;
}

.harmony-guide-actions button:first-child:not(:last-child) {
  flex: 1 1 auto;
  color: #fff;
  background: #6b5ab9;
  font-weight: 900;
}

.harmony-guide-loading {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.harmony-guide-loading i {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(100, 81, 174, .14);
  border-top-color: #6a58b7;
  border-radius: 50%;
  animation: harmony-spin .8s linear infinite;
}

.harmony-guide-loading strong { font-size: 11px; }
.harmony-guide-loading p { margin: 0; color: #978b92; font-size: 8px; }

@media (max-width: 620px) {
  .harmony-entry-sheet {
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 92dvh;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .harmony-entry-dialog-body {
    padding: 16px 14px max(14px, env(safe-area-inset-bottom));
  }

  .harmony-guide-progress {
    grid-template-columns: repeat(6, 58px);
    justify-content: flex-start;
  }

  .harmony-guide-recorded { max-height: 155px; }
}

.harmony-entry-ai-summary { margin: 10px 0 0; padding: 10px 11px; border-left: 3px solid #7563c0; border-radius: 4px 11px 11px 4px; color: #5f5660; background: #f2effb; font-size: 8px; line-height: 1.65; }
.harmony-entry-ai-summary small { display: block; margin-bottom: 4px; color: #6d5bb7; font-weight: 900; }
.harmony-history-record { padding: 0 !important; overflow: hidden; }
.harmony-history-record > button { width: 100%; padding: 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; border: 0; color: inherit; text-align: left; background: transparent; }
.harmony-history-record > button > div { min-width: 0; }
.harmony-history-record > button > span { padding: 5px 7px; border-radius: 999px; color: #6b5a63; background: #f1eaee; font-size: 7px; white-space: nowrap; }
.harmony-history-record > button > b { color: #a18e98; font-size: 19px; }
.harmony-history-dialog-head > button:first-child:not(:last-child) { color: #6654b2; background: #efebfb; }
.harmony-history-detail { min-height: 0; padding: 2px 2px 12px; display: flex; flex-direction: column; gap: 13px; overflow: auto; overscroll-behavior: contain; }
.harmony-history-detail-meta { padding: 13px; border-radius: 17px; background: linear-gradient(135deg, #f3effc, #fff); }
.harmony-history-detail-meta small { color: #7765bd; font-size: 8px; font-weight: 900; }
.harmony-history-detail-meta strong { display: block; margin: 3px 0; font-size: 13px; }
.harmony-history-detail-meta p { margin: 0; color: #8f838a; font-size: 8px; line-height: 1.55; }
.harmony-history-person { padding: 12px; border: 1px solid #e8e1e5; border-radius: 19px; background: #fff; }
.harmony-history-person > .harmony-entry-card { margin: 0; box-shadow: none; }
.harmony-history-guide-head { margin: 12px 0 8px; padding-top: 11px; display: flex; align-items: center; gap: 9px; border-top: 1px dashed #e3dce0; }
.harmony-history-guide-head > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #7060bb; }
.harmony-history-guide-head strong { display: block; font-size: 9px; }
.harmony-history-guide-head small { color: #988b92; font-size: 7px; }
.harmony-history-guide-messages { max-height: 330px; padding: 9px; display: flex; flex-direction: column; gap: 8px; overflow: auto; border-radius: 14px; background: #f8f5f7; }
.harmony-history-guide-messages article { max-width: 90%; align-self: flex-start; }
.harmony-history-guide-messages article.user { align-self: flex-end; }
.harmony-history-guide-messages small { display: block; margin: 0 3px 3px; color: #9b8e95; font-size: 7px; }
.harmony-history-guide-messages article.user small { text-align: right; }
.harmony-history-guide-messages p { margin: 0; padding: 9px 10px; border-radius: 13px 13px 13px 4px; color: #574d53; background: #ebe6e9; font-size: 8px; line-height: 1.65; }
.harmony-history-guide-messages article.user p { border-radius: 13px 13px 4px 13px; color: #fff; background: #6e5dbc; }
.harmony-history-no-guide { margin: 10px 0 0; padding: 10px; border-radius: 12px; color: #978a91; background: #f7f3f5; font-size: 8px; line-height: 1.55; }
.harmony-history-result, .harmony-history-agreement { padding: 13px; border-radius: 17px; background: #fff; }
.harmony-history-result small, .harmony-history-agreement small { display: block; margin-bottom: 6px; color: #7866bd; font-size: 8px; font-weight: 900; }
.harmony-history-result div { color: #594f54; font-size: 8px; line-height: 1.7; }
.harmony-history-agreement blockquote { margin: 0; color: #4f5e59; font-size: 10px; line-height: 1.65; }