.home-question-tabs {
  display: flex;
  gap: 28px;
  margin: 28px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-question-tabs[hidden],
.prompt-title #refreshQuestions[hidden],
.prompt-title.grouped-questions,
.home-question-pagination[hidden],
.home-question-page[hidden],
.conversation.has-conversation .home-question-tabs,
.conversation.has-conversation .home-question-carousel,
.conversation.has-conversation .home-question-pagination {
  display: none;
}

.home-question-tabs button {
  flex: none;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #536079;
  font-size: 14px;
  white-space: nowrap;
}

.home-question-tabs button[aria-selected="true"] {
  border-bottom-color: #6268f5;
  color: #585df1;
  font-weight: 650;
}

.home-question-tabs button:focus-visible,
.prompt-card button:focus-visible {
  outline: 2px solid #7775f5;
  outline-offset: -3px;
  border-radius: 6px;
}

/* 首页只在卡片轨道横向翻页，不产生纵向页面或内部滚动。 */
body:not(.integration-embedded) .workspace.is-home {
  overflow: hidden;
}

body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .conversation-scroll {
  overflow: hidden;
}

body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .conversation-inner {
  padding-top: clamp(32px, 14vh, 150px);
  padding-bottom: 16px;
}

.home-question-carousel {
  position: relative;
  padding: 10px;
  border: 1px solid #ffffffc7;
  border-radius: 20px;
  background: #f4f7ff85;
  box-shadow: 0 8px 28px #647aaa0a;
  backdrop-filter: blur(12px);
}

/* 放在滚动轨道外，避免提示被卡片圆角和横向滚动容器裁切。 */
.home-question-hint {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 50%;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 9px 12px;
  border: 1px solid #e2e6f4;
  border-radius: 12px;
  background: #fffffff5;
  color: #606b83;
  box-shadow: 0 4px 16px #52648c12;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: left;
  transform: translateX(-50%);
  visibility: hidden;
  pointer-events: none;
}

.home-question-hint span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.home-question-hint span + span {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid #e5e8f2;
}

.home-question-hint svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #8581cb;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-question-hint span + span svg {
  transform: rotate(-90deg);
}

.home-question-carousel:has(.prompt-card:hover) .home-question-hint,
.home-question-carousel:has(.prompt-card button:focus-visible) .home-question-hint {
  visibility: visible;
}

#homeQuestionPanel.prompt-grid {
  --question-card-height: 88px;
  display: grid;
  grid-template-columns: none;
  grid-template-rows: repeat(2, var(--question-card-height));
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 28px) / 3);
  gap: 12px 14px;
  width: 100%;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

#homeQuestionPanel::-webkit-scrollbar,
.home-question-tabs::-webkit-scrollbar {
  display: none;
}

.conversation.has-conversation #homeQuestionPanel {
  display: none;
}

#homeQuestionPanel .prompt-card {
  position: relative;
  display: block;
  min-height: var(--question-card-height);
  height: var(--question-card-height);
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffffd9;
  border-radius: 12px;
  background: #ffffffe0;
  box-shadow: none;
  scroll-snap-align: start;
  transition: border-color .18s, background .18s;
}

#homeQuestionPanel .prompt-card:hover,
#homeQuestionPanel .prompt-card:focus-within {
  transform: none;
  border-color: #b9c5ee;
  background: #fff;
  box-shadow: none;
}

#homeQuestionPanel .prompt-card::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #8d88db;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}

#homeQuestionPanel .prompt-card:hover::before,
#homeQuestionPanel .prompt-card:focus-within::before {
  opacity: 1;
}

#homeQuestionPanel .prompt-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 10px 48px 10px 18px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  text-align: left;
}

#homeQuestionPanel .prompt-icon.shortcut {
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 0;
  background: transparent;
}

#homeQuestionPanel .prompt-icon svg {
  width: 20px;
  height: 20px;
}

#homeQuestionPanel .prompt-question {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: #465269;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

#homeQuestionPanel .prompt-arrow-circle {
  position: absolute;
  top: 50%;
  right: 12px;
  bottom: auto;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a0abc1;
  transform: translateY(-50%);
  transition: background .18s, color .18s;
}

#homeQuestionPanel .prompt-card:hover .prompt-arrow-circle,
#homeQuestionPanel .prompt-card:focus-within .prompt-arrow-circle {
  background: #f2f4ff;
  color: #717dba;
}

#homeQuestionPanel .prompt-card .prompt-arrow-circle:hover,
#homeQuestionPanel .prompt-card .prompt-arrow-circle:focus-visible {
  background: #eef1ff;
  color: #6269cc;
}

#homeQuestionPanel .prompt-arrow-circle svg {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}

.home-question-page {
  position: absolute;
  z-index: 1;
  top: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #e5e7f3;
  border-radius: 50%;
  background: #fff;
  color: #727a9d;
  box-shadow: 0 3px 12px #55628b12;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .15s, color .15s;
}

.home-question-page.previous {
  left: -16px;
}

.home-question-page.previous svg {
  transform: rotate(180deg);
}

.home-question-page.next {
  right: -16px;
}

.home-question-carousel:hover .home-question-page,
.home-question-carousel:focus-within .home-question-page {
  opacity: 1;
}

.home-question-page:disabled {
  color: #c7ccdb;
  cursor: default;
}

.home-question-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 28px;
}

.home-question-pagination button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #cbd3e8;
  transition: width .2s, background .2s;
}

.home-question-pagination button[aria-current="true"] {
  width: 18px;
  background: #8d88db;
}

@media (max-width: 1199px) {
  #homeQuestionPanel.prompt-grid {
    grid-auto-columns: calc((100% - 14px) / 2);
  }
}

@media (max-width: 520px) {
  .home-question-tabs {
    gap: 18px;
    margin: 22px 0 12px;
  }

  .home-question-tabs button {
    font-size: 13px;
  }

  #homeQuestionPanel.prompt-grid {
    grid-auto-columns: 100%;
  }

  .home-question-carousel {
    padding: 8px;
    border-radius: 18px;
  }

  .home-question-hint {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .home-question-hint span {
    gap: 5px;
  }

  .home-question-hint span + span {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .home-question-hint svg {
    width: 12px;
    height: 12px;
  }

  #homeQuestionPanel .prompt-card-main {
    padding-left: 14px;
  }

  .home-question-page {
    opacity: 1;
    width: 28px;
    height: 28px;
  }
}

@media (max-height: 720px) {
  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .conversation-inner {
    padding-top: 24px;
  }
}

@media (max-width: 520px) and (max-height: 620px) {
  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .conversation-inner {
    padding-top: 12px;
  }

  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .page-heading {
    gap: 12px;
    margin-bottom: 10px;
  }

  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .hero-copy h1 {
    font-size: 20px;
  }

  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .hero-copy p {
    font-size: 12px;
  }

  .home-question-tabs {
    margin-top: 16px;
  }

  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .welcome-composer {
    min-height: 110px;
    padding: 8px 12px;
  }

  body:not(.integration-embedded) .workspace .conversation[data-capability="ask"]:not(.has-conversation) .welcome-composer textarea {
    min-height: 36px;
    height: 36px;
  }

  #homeQuestionPanel.prompt-grid {
    row-gap: 10px;
  }

  #homeQuestionPanel .prompt-card-main {
    gap: 9px;
    padding-left: 12px;
  }

  #homeQuestionPanel .prompt-question {
    font-size: 13px;
  }

}

@media (prefers-reduced-motion: reduce) {
  #homeQuestionPanel .prompt-card,
  #homeQuestionPanel .prompt-card::before,
  #homeQuestionPanel .prompt-arrow-circle,
  .home-question-page,
  .home-question-pagination button {
    transition: none;
  }
}
