/* 6Q 超级爸妈首页（6Q教育官方平台）
   两套顶壳：.q6--mp 小程序（无状态栏 + 胶囊）/ .q6--app（状态栏），其余内容共用一套。 */

.q6-screen,
.q6-frame {
  background: #fff6f1;
}

.q6-scroll {
  background: linear-gradient(
    180deg,
    #ffefe7 0%,
    #fff6f1 210px,
    #fffbf9 420px,
    #ffffff 100%
  );
  padding-bottom: 10px;
}

/* ---------- 状态栏（APP） ---------- */

.q6-statusbar {
  flex-shrink: 0;
  height: 44px;
  padding: 10px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: #ffece3;
  color: #3a2b25;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.q6-statusbar__time {
  font-variant-numeric: tabular-nums;
}

.q6-statusbar__icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.q6-statusbar__icons svg {
  display: block;
}

/* ---------- 顶栏 ---------- */

.q6-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px 0 14px;
}

.q6--mp .q6-top {
  padding-top: 14px;
}

.q6--app .q6-top {
  padding-top: 4px;
}

.q6-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-top: 2px;
}

.q6-brand svg {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

.q6-brand strong {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #3a2b25;
  white-space: nowrap;
}

.q6-tools {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-left: auto;
}

.q6-tool {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6a5248;
  font: inherit;
  cursor: pointer;
}

.q6-tool svg {
  width: 18px;
  height: 18px;
}

.q6-tool span {
  font-size: 8.5px;
  line-height: 1.15;
  white-space: nowrap;
  color: #6a5248;
}

.q6-dot {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ff5a5f;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

/* 小程序胶囊 */
.q6-capsule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  margin-left: 3px;
  padding: 0 7px;
  border: 1px solid rgba(58, 43, 37, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #4b3a32;
}

.q6-capsule i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 2px;
  line-height: 1;
}

.q6-capsule b {
  width: 12px;
  height: 12px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.q6-capsule b::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- 「AI / 6Q首页」双 tab 切换 ----------
   6Q 首页和 AI 专区共用同一套 class：
   两个纯文字 tab 靠左并排、只占文字宽；选中项加粗，文字下方等宽的下划线。
   专区首页压在黏土插画上，文字改用深棕 + 微白描边保证对比度，下划线用深赭。 */

.q6-tabbar {
  display: flex;
  width: fit-content;
  align-items: flex-end;
  gap: 18px;
  margin: 8px 16px 0;
}

.q6-tabbar__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px 0 9px;
  border: 0;
  background: transparent;
  color: #a08878;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 180ms var(--ease-soft), font-weight 180ms var(--ease-soft);
}

/* 指示器：和文字同宽，从左往右展开 */
.q6-tabbar__tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: #ff6a34;
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: left center;
  transition: opacity 180ms var(--ease-soft), transform 180ms var(--ease-soft);
  pointer-events: none;
}

.q6-tabbar__tab:hover {
  color: #b1502a;
}

.q6-tabbar__tab.is-on {
  color: #ff6a34;
  font-weight: 800;
}

.q6-tabbar__tab.is-on:hover {
  color: #ff6a34;
}

.q6-tabbar__tab.is-on::after {
  opacity: 1;
  transform: scaleX(1);
}

.q6-tabbar__tab:focus-visible {
  outline: 2px solid #ff6a34;
  outline-offset: 3px;
  border-radius: 4px;
}

/* AI 专区：钉在黏土岛屿左上角，和头像行左边对齐，只占文字宽 */
.q6-tabbar--hub {
  position: absolute;
  z-index: 6;
  top: 60px;
  left: 12px;
  margin: 0;
}

.q6-tabbar--hub .q6-tabbar__tab {
  color: #6f4a35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.q6-tabbar--hub .q6-tabbar__tab:hover {
  color: #5a3a28;
}

.q6-tabbar--hub .q6-tabbar__tab.is-on {
  color: #4a2d1f;
}

/* 黏土底色上暖橙下划线对比度不足，换成深赭 */
.q6-tabbar--hub .q6-tabbar__tab.is-on::after {
  background: #a4471f;
}

/* ---------- 搜索 ---------- */

.q6-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  margin: 10px 16px 0;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(214, 150, 120, 0.12);
}

.q6-search > svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #c6afa2;
}

.q6-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #3a2b25;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.q6-search input::placeholder {
  color: #c3b0a6;
}

.q6-search__scan {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7a6357;
  cursor: pointer;
}

.q6-search__scan svg {
  width: 17px;
  height: 17px;
}

/* ---------- 横幅 ---------- */

.q6-hero {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 8px;
  margin: 12px 16px 0;
}

.q6-hero__main {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 128px;
  padding: 13px 12px;
  border-radius: 16px;
  background: linear-gradient(140deg, #fff0e2 0%, #ffdcc4 55%, #ffc9a9 100%);
  color: #7a3b18;
  text-decoration: none;
  cursor: pointer;
}

.q6-hero__main strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 104px;
  color: #5c2c10;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

.q6-hero__main p {
  position: relative;
  z-index: 1;
  max-width: 100px;
  margin: 5px 0 0;
  color: #9a5a32;
  font-size: 10px;
  line-height: 1.4;
}

.q6-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  margin-top: 9px;
  padding: 0 9px 0 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a4c, #ff6a28);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(214, 96, 34, 0.28);
}

.q6-hero__mascot {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 78px;
  height: 78px;
}

.q6-hero__side {
  display: grid;
  gap: 8px;
}

.q6-mini {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 60px;
  padding: 9px 10px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(214, 150, 120, 0.1);
}

.q6-mini strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 104px;
  color: #5c2c10;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.q6-mini small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 2px;
  color: #b08c7d;
  font-size: 9px;
  line-height: 1.3;
}

.q6-mini svg {
  position: absolute;
  right: -3px;
  bottom: -5px;
  width: 46px;
  height: 46px;
}

/* ---------- 公告 ---------- */

.q6-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  margin: 12px 16px 0;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(214, 150, 120, 0.08);
}

.q6-notice > svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #ff7a3c;
}

.q6-notice__tag {
  flex-shrink: 0;
  color: #c2582a;
  font-size: 11px;
  font-weight: 800;
}

.q6-notice p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #7a5c4e;
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- 十宫格 ---------- */

.q6-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px 2px;
  margin: 12px 12px 0;
  padding: 14px 4px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(214, 150, 120, 0.09);
}

.q6-cell {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.q6-cell__ico {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.07);
  transition: transform var(--dur-fast) var(--ease-soft);
}

.q6-cell:active .q6-cell__ico {
  transform: scale(0.94);
}

.q6-cell span {
  color: #5e4a41;
  font-size: 9.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.q6-cell--1 .q6-cell__ico { background: linear-gradient(150deg, #ffb27a, #ff8a4c); }
.q6-cell--2 .q6-cell__ico { background: linear-gradient(150deg, #ffd36e, #ffb43b); }
.q6-cell--3 .q6-cell__ico { background: linear-gradient(150deg, #7ed0f4, #3ea6e0); }
.q6-cell--4 .q6-cell__ico { background: linear-gradient(150deg, #6fd6c4, #33b7a4); }
.q6-cell--5 .q6-cell__ico { background: linear-gradient(150deg, #c2a8ff, #9b7bf0); }
.q6-cell--6 .q6-cell__ico { background: linear-gradient(150deg, #ffd98e, #ffbe4d); }
.q6-cell--7 .q6-cell__ico { background: linear-gradient(150deg, #ffb08a, #ff8358); }
.q6-cell--8 .q6-cell__ico { background: linear-gradient(150deg, #ffb3c7, #ff6f96); }
.q6-cell--9 .q6-cell__ico { background: linear-gradient(150deg, #ffc98a, #ff9a4d); }
.q6-cell--10 .q6-cell__ico { background: linear-gradient(150deg, #ffb0d3, #f5669f); }

/* ---------- 工作坊横幅 ---------- */

.q6-poster {
  position: relative;
  display: block;
  overflow: hidden;
  width: calc(100% - 32px);
  height: 88px;
  margin: 12px 16px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(112deg, #ffe9ed 0%, #ffd9e0 52%, #ffc8d3 100%);
  color: #8e1f36;
  text-decoration: none;
  cursor: pointer;
}

.q6-poster small {
  position: relative;
  z-index: 1;
  display: block;
  color: #b5566b;
  font-size: 8.5px;
  letter-spacing: 0.4px;
}

.q6-poster strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 62%;
  margin-top: 2px;
  color: #d6213f;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.q6-poster em {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 7px;
  color: #b5566b;
  font-size: 9.5px;
  font-style: normal;
}

.q6-poster svg {
  position: absolute;
  right: -4px;
  bottom: -12px;
  width: 108px;
  height: 78px;
}

/* ---------- 热门文章 / 热门话题 ---------- */

.q6-duo {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 12px;
  margin: 14px 16px 0;
}

.q6-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.q6-feed__head h2 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #5c2c10;
  font-size: 12.5px;
  font-weight: 800;
}

.q6-feed__head h2::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: linear-gradient(135deg, #ffa26b, #ff6b3d);
}

.q6-feed__head button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b08c7d;
  font: inherit;
  font-size: 9.5px;
  white-space: nowrap;
  cursor: pointer;
}

.q6-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.q6-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(214, 150, 120, 0.07);
  cursor: pointer;
}

.q6-thumb {
  position: relative;
  width: 46px;
  height: 38px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffd9a8, #ffb56b);
}

.q6-thumb--sun {
  background: linear-gradient(160deg, #ffe39b 0%, #ffc94d 46%, #7fc98a 47%, #4f9d63 100%);
}

.q6-thumb--room {
  background: linear-gradient(150deg, #ffd7c2 0%, #ffb894 48%, #f28c5c 100%);
}

.q6-thumb--high {
  background: linear-gradient(150deg, #ffb1b8 0%, #f26a7a 100%);
}

.q6-thumb--star {
  background: linear-gradient(150deg, #ffd36e 0%, #ff9a3c 100%);
}

.q6-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #4b3a32;
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.q6-topic {
  position: relative;
  display: grid;
  align-content: end;
  overflow: hidden;
  height: 62px;
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 11px;
  background: linear-gradient(150deg, #ffe1c4, #ffb27a);
  cursor: pointer;
}

.q6-topic strong {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 10px;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(120, 50, 10, 0.25);
}

.q6-topic i {
  position: absolute;
  top: 6px;
  left: 8px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #c2582a;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.q6-topic--2 {
  background: linear-gradient(150deg, #ffd0dd, #ff8fa8);
}

/* ---------- 底部 Tab ---------- */

.q6-tabs {
  flex-shrink: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  height: 56px;
  padding-bottom: 2px;
  border-top: 1px solid #f7e9e2;
  background: #fff;
}

.q6--app .q6-tabs {
  height: 62px;
  padding-bottom: 12px;
}

.q6-tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a99a92;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.q6-tab svg {
  width: 21px;
  height: 21px;
}

.q6-tab.is-on {
  color: #ff7a3c;
  font-weight: 700;
}

/* 小程序没有底部横条 */
.q6--mp .ios-home-indicator {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .q6-tabbar__tab,
  .q6-tabbar__tab::after,
  .q6-cell__ico {
    transition: none;
  }
}
