/* ==========================================================================
   智慧西林 · 党建AI平台  移动端样式
   设计基调：党建红 + 暖金 + 米白，卡片化、圆角、留白充足
   ========================================================================== */

:root {
  --red: #c1272d;
  --red-deep: #9c1418;
  --red-dark: #7a0e12;
  --red-soft: #fdf1f0;
  --gold: #e3b778;
  --gold-soft: #fbf4e8;

  --ink: #1b1f24;
  --ink-2: #565d66;
  --ink-3: #8b929b;
  --line: #ecebe6;

  --bg: #f5f4f1;
  --card: #ffffff;

  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;

  --fs: 15.5px;
  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --shadow-card: 0 2px 10px rgba(27, 31, 36, .045);
  --shadow-float: 0 10px 30px rgba(122, 14, 18, .16);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #e9e7e2;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(193, 39, 45, .10), transparent 45%),
    radial-gradient(circle at 88% 92%, rgba(227, 183, 120, .16), transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 舞台（手机容器） ---------- */
.stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 560px) and (min-height: 680px) {
  .stage {
    height: min(880px, 94dvh);
    border-radius: 34px;
    box-shadow: 0 40px 90px -20px rgba(31, 20, 18, .35), 0 0 0 1px rgba(0, 0, 0, .05);
  }
}

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ==========================================================================
   首页
   ========================================================================== */
.hero {
  position: relative;
  padding: calc(14px + var(--safe-t)) 18px 54px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(232, 194, 138, .24), transparent 55%),
    linear-gradient(140deg, #dc938c 0%, #cd7a73 52%, #c06a64 100%);
  color: #fff;
  overflow: hidden;
  flex: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.hero-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.25;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .72);
  margin-top: 2px;
}

.hero-top .spacer {
  flex: 1;
}

.hero-badge {
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .10);
  letter-spacing: .04em;
  white-space: nowrap;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 22px 0 0;
  font-size: 25px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .02em;
  color: #ffd24a;
  text-shadow: 0 1px 0 rgba(122, 42, 34, .30), 0 3px 10px rgba(110, 36, 30, .26);
}

.hero-title em {
  font-style: normal;
  color: #ffe08a;
  text-shadow: 0 1px 0 rgba(122, 42, 34, .30), 0 3px 10px rgba(110, 36, 30, .26);
}

.hero-desc {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .92);
  max-width: 290px;
}

.searchbar {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 18px rgba(80, 8, 10, .22);
}

.searchbar svg {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  flex: none;
}

.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink);
  font-family: inherit;
}

.searchbar input::placeholder {
  color: #a9aeb5;
}

/* 横幅卡片：压在 hero 底部 */
.banner {
  margin: -38px 16px 0;
  position: relative;
  z-index: 2;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 26px -8px rgba(90, 20, 20, .22);
  padding: 14px 14px 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .8);
}

.banner-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: var(--red-soft);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
}

.banner-text {
  flex: 1;
  min-width: 0;
}

.banner-kicker {
  font-size: 10.5px;
  color: var(--red);
  letter-spacing: .12em;
  font-weight: 600;
}

.banner-title {
  font-size: 14px;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-go {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--red);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.banner-go svg {
  width: 14px;
  height: 14px;
}

/* 通用小节 */
.sec {
  padding: 22px 16px 0;
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.sec-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
  position: relative;
  padding-left: 10px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red), #d4614f);
}

.sec-more {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* 助手网格 */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.agent-grid[hidden] {
  display: none;
}

.agent-card {
  text-align: left;
  border: 1px solid rgba(236, 235, 230, .9);
  background: var(--card);
  border-radius: var(--r-md);
  padding: 13px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
  font-family: inherit;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.agent-card:active {
  transform: scale(.975);
}

.agent-card::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -30px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--tint, #fdf1f0);
  opacity: .55;
}

.agent-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--c, var(--red));
  background: var(--tint, var(--red-soft));
  font-family: "Songti SC", "STSong", serif;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.agent-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.agent-desc {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
  position: relative;
  z-index: 1;
}

.agent-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #35b37e;
  box-shadow: 0 0 0 3px rgba(53, 179, 126, .14);
}

.agent-foot .go {
  margin-left: auto;
  color: var(--c, var(--red));
  font-size: 11px;
  font-weight: 600;
}

/* 快捷提问 */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 16px 4px;
  margin: 0 -16px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.chip:active {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f3d3d1;
}

/* 学习卡 */
.learn-list {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.learn-item {
  display: flex;
  gap: 12px;
  padding: 14px 15px;
  cursor: pointer;
  align-items: flex-start;
  border-bottom: 1px solid #f4f3ef;
}

.learn-item:last-child {
  border-bottom: 0;
}

.learn-item:active {
  background: #faf9f6;
}

.learn-date {
  flex: none;
  width: 44px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}

.learn-date b {
  display: block;
  font-size: 16px;
  color: var(--red);
  font-family: Georgia, "Songti SC", serif;
  line-height: 1.1;
}

.learn-date span {
  font-size: 10px;
  color: var(--ink-3);
}

.learn-body {
  flex: 1;
  min-width: 0;
}

.learn-body h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}

.learn-body p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-foot {
  text-align: center;
  font-size: 10.5px;
  color: #b3b7bd;
  padding: 26px 20px 24px;
  line-height: 1.8;
}

/* ==========================================================================
   页签栏
   ========================================================================== */
.tabbar {
  flex: none;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid rgba(0, 0, 0, .06);
  z-index: 20;
}

.tabbar.hide {
  display: none;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9aa0a7;
  font-size: 10.5px;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 0 2px;
  transition: color .15s ease;
  position: relative;
}

.tab svg {
  width: 21px;
  height: 21px;
}

.tab.on {
  color: var(--red);
  font-weight: 600;
}

.tab.on::before {
  content: "";
  position: absolute;
  top: 0;
  width: 18px;
  height: 2.5px;
  border-radius: 0 0 3px 3px;
  background: var(--red);
}

/* ==========================================================================
   对话页
   ========================================================================== */
.chat-head {
  flex: none;
  padding-top: var(--safe-t);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.chat-head-row {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: inherit;
  flex: none;
}

.icon-btn:active {
  background: #f3f2ee;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.chat-id {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  font-family: "Songti SC", "STSong", serif;
  flex: none;
}

.chat-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-status {
  font-size: 10.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.chat-status .dot {
  width: 4px;
  height: 4px;
}

.msg-wrap {
  padding: 16px 14px 20px;
}

.msg {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.msg.me {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-family: "Songti SC", "STSong", serif;
  margin-top: 2px;
}

.msg.ai .msg-avatar {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #f6dedd;
}

.msg.me .msg-avatar {
  background: #ecebe7;
  color: #6b7178;
}

.bubble {
  max-width: calc(100% - 62px);
  padding: 10px 13px;
  border-radius: 15px;
  font-size: var(--fs);
  line-height: 1.75;
  word-break: break-word;
  overflow-wrap: anywhere;
  animation: bubbleIn .22s ease both;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.msg.me .bubble {
  background: linear-gradient(135deg, #c62a30, #9c1418);
  color: #fff;
  border-top-right-radius: 5px;
  box-shadow: 0 6px 16px -8px rgba(156, 20, 24, .7);
}

.msg.ai .bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-top-left-radius: 5px;
  box-shadow: var(--shadow-card);
}

.msg.ai .bubble.is-error {
  background: #fff8f7;
  border-color: #f6d8d5;
}

/* markdown */
.bubble p {
  margin: 0 0 .62em;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.bubble h1,
.bubble h2,
.bubble h3,
.bubble h4 {
  margin: .9em 0 .45em;
  font-size: 1.02em;
  font-weight: 700;
  color: var(--red-deep);
  line-height: 1.5;
}

.bubble h1:first-child,
.bubble h2:first-child,
.bubble h3:first-child {
  margin-top: 0;
}

.bubble strong {
  font-weight: 700;
  color: #12100f;
}

.bubble em {
  font-style: normal;
  background: linear-gradient(180deg, transparent 62%, #fbe6c8 62%);
}

.bubble ul,
.bubble ol {
  margin: .35em 0 .7em;
  padding-left: 1.25em;
}

.bubble li {
  margin: .22em 0;
}

.bubble li::marker {
  color: var(--red);
}

.bubble code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .88em;
  background: #f6f1ef;
  color: #9c1418;
  padding: 1px 5px;
  border-radius: 5px;
}

.bubble pre {
  background: #29231f;
  color: #f3ece5;
  padding: 12px;
  border-radius: 11px;
  overflow-x: auto;
  margin: .6em 0;
  font-size: 12.5px;
  line-height: 1.65;
}

.bubble pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.bubble blockquote {
  margin: .6em 0;
  padding: 6px 0 6px 11px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 8px 8px 0;
  color: #6c5a44;
  font-size: .95em;
}

.bubble blockquote p {
  margin: 0;
}

.bubble table {
  border-collapse: collapse;
  width: 100%;
  margin: .6em 0;
  font-size: .9em;
  display: block;
  overflow-x: auto;
}

.bubble th,
.bubble td {
  border: 1px solid #ece7e2;
  padding: 6px 9px;
  text-align: left;
  white-space: nowrap;
}

.bubble th {
  background: #faf6f2;
  font-weight: 600;
}

.bubble hr {
  border: 0;
  border-top: 1px dashed #e6e0d9;
  margin: .8em 0;
}

.bubble a {
  color: #b0231f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--red);
  vertical-align: -2px;
  margin-left: 1px;
  animation: blink .95s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9c3bd;
  animation: bounce 1.2s infinite;
}

.typing i:nth-child(2) {
  animation-delay: .16s;
}

.typing i:nth-child(3) {
  animation-delay: .32s;
}

@keyframes bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .55;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.msg-tools {
  margin-top: 7px;
  display: flex;
  gap: 6px;
}

.tool-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tool-btn:active {
  color: var(--red);
  border-color: #f1d4d2;
}

/* 空态 */
.empty {
  padding: 26px 20px 10px;
  text-align: center;
}

.empty-emblem {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.empty-emblem img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.empty-emblem svg {
  width: 32px;
  height: 32px;
}

.agent-icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.empty h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.empty p {
  margin: 7px auto 0;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.75;
  max-width: 270px;
}

.q-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
}

.q-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color .15s ease, transform .15s ease;
}

.q-item:active {
  transform: scale(.985);
  border-color: #f0cfcc;
}

.q-item span.qi {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.q-item span.qgo {
  margin-left: auto;
  color: #c6c9ce;
  flex: none;
}

/* 输入区 */
.composer {
  flex: none;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 9px 12px calc(9px + var(--safe-b));
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.c-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.c-btn svg {
  width: 19px;
  height: 19px;
}

.c-btn:active {
  transform: scale(.94);
  background: #f6f5f2;
}

.c-input {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #f4f3f0;
  border-radius: 19px;
  border: 1px solid transparent;
  transition: border-color .15s ease, background .15s ease;
  padding: 0 4px;
}

.c-input:focus-within {
  background: #fff;
  border-color: #f0cbc8;
}

.c-input textarea {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  /* 防止 iOS 聚焦缩放 */
  line-height: 1.5;
  color: var(--ink);
  padding: 9px 10px;
  max-height: 108px;
  min-height: 38px;
}

.c-input textarea::placeholder {
  color: #a8adb4;
}

.send-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(140deg, #cb3036, #9c1418);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(156, 20, 24, .8);
  transition: opacity .15s ease, transform .15s ease;
}

.send-btn svg {
  width: 18px;
  height: 18px;
}

.send-btn:disabled {
  opacity: .35;
  box-shadow: none;
}

.send-btn:active:not(:disabled) {
  transform: scale(.93);
}

.send-btn.stop {
  background: #fff;
  border: 1px solid #f0cbc8;
  color: var(--red);
  box-shadow: none;
}

.composer-hint {
  font-size: 10px;
  color: #b0b5bc;
  text-align: center;
  margin-top: 7px;
  letter-spacing: .02em;
}

/* ==========================================================================
   学习页 / 我的页
   ========================================================================== */
.page-head {
  flex: none;
  padding: calc(12px + var(--safe-t)) 18px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
}

.page-head p {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
}

.streak {
  margin: 16px;
  border-radius: var(--r-lg);
  padding: 16px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(227, 183, 120, .28), transparent 60%),
    linear-gradient(135deg, #b81e24, #8a1015);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 26px -14px rgba(140, 16, 20, .9);
}

.streak .days {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  font-family: Georgia, serif;
}

.streak .days span {
  font-size: 12px;
  font-family: inherit;
  font-weight: 400;
  margin-left: 4px;
  color: rgba(255, 255, 255, .8);
}

.streak .st-label {
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
  margin-bottom: 6px;
}

.streak .st-note {
  font-size: 11px;
  color: rgba(255, 255, 255, .7);
  line-height: 1.6;
  margin-top: 6px;
}

.streak .ring {
  margin-left: auto;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(#f4d9a8 0 66%, rgba(255, 255, 255, .22) 66% 100%);
  display: grid;
  place-items: center;
}

.streak .ring i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #9c1418;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  color: #f4d9a8;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.topic {
  border-radius: var(--r-md);
  padding: 14px;
  min-height: 96px;
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 0;
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .16s ease;
}

.topic:active {
  transform: scale(.975);
}

.topic::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}

.topic b {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.topic span {
  font-size: 10.5px;
  color: rgba(255, 255, 255, .78);
  position: relative;
  z-index: 1;
}

/* 我的页 */
.profile {
  padding: calc(18px + var(--safe-t)) 18px 22px;
  background:
    radial-gradient(100% 130% at 100% 0%, rgba(227, 183, 120, .26), transparent 58%),
    linear-gradient(140deg, #b81e24, #870f14);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  font-family: "Songti SC", serif;
  flex: none;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 17px;
  font-weight: 700;
}

.profile-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .78);
  margin-top: 4px;
}

.profile-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.profile-tags i {
  font-style: normal;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
}

.stat-row {
  display: flex;
  background: #fff;
  margin: -12px 16px 0;
  border-radius: var(--r-md);
  padding: 14px 0;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .9);
}

.stat {
  flex: 1;
  text-align: center;
  position: relative;
}

.stat+.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--line);
}

.stat b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  font-family: Georgia, serif;
  color: var(--red-deep);
}

.stat span {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 3px;
  display: block;
}

.card-block {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  margin: 14px 16px 0;
  overflow: hidden;
}

.block-title {
  padding: 14px 15px 10px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.block-title .tag {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--red);
  background: var(--red-soft);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .02em;
}

.cell {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-top: 1px solid #f5f4f0;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--ink);
  background: #fff;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.cell:active {
  background: #faf9f6;
}

.cell .c-label {
  flex: 1;
}

.cell .c-value {
  font-size: 12px;
  color: var(--ink-3);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell .c-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #f6f5f2;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex: none;
}

.cell .c-icon svg {
  width: 15px;
  height: 15px;
}

.chev {
  width: 14px;
  height: 14px;
  color: #c8ccd1;
  flex: none;
}

.api-tip {
  margin: 0 15px 14px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-3);
  background: #faf9f6;
  border-radius: 10px;
  padding: 9px 11px;
}

.api-tip b {
  color: var(--red);
  font-weight: 600;
}

.ver {
  text-align: center;
  font-size: 10.5px;
  color: #b6bac0;
  line-height: 2;
  padding: 22px 24px calc(24px + var(--tab-h));
}

/* ==========================================================================
   弹层 / 表单
   ========================================================================== */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 12, .42);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .18s ease;
}

.sheet-mask[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.sheet {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(20px + var(--safe-b));
  max-height: 86dvh;
  overflow-y: auto;
  animation: sheetUp .26s cubic-bezier(.22, .8, .5, 1);
}

@media (min-width: 560px) and (min-height: 680px) {
  .sheet-mask {
    align-items: center;
  }

  .sheet {
    border-radius: 22px;
    max-width: 400px;
    margin: 0 auto;
    padding-bottom: 20px;
    animation: bubbleIn .26s ease;
  }
}

@keyframes sheetUp {
  from {
    transform: translateY(30%);
    opacity: .6;
  }
}

.sheet-grip {
  width: 34px;
  height: 4px;
  border-radius: 4px;
  background: #e6e3de;
  margin: 0 auto 12px;
}

.sheet h3 {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 700;
}

.sheet .sub {
  margin: 0 0 16px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.6;
}

.field {
  margin-bottom: 13px;
}

.field label {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.field input[type=text],
.field input[type=password],
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  background: #faf9f7;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  outline: 0;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
  appearance: none;
}

.field input:focus,
.field select:focus {
  border-color: #e8a9a5;
  background: #fff;
}

.field .hint {
  font-size: 10.5px;
  color: #a8adb4;
  margin-top: 5px;
  line-height: 1.6;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid #f5f4f0;
}

.switch-row .sw-label {
  flex: 1;
  font-size: 13px;
}

.switch-row .sw-label small {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.5;
}

.switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #dfdcd7;
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background .2s ease;
  border: 0;
  padding: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .2s cubic-bezier(.3, .8, .4, 1);
}

.switch.on {
  background: linear-gradient(135deg, #c62a30, #9c1418);
}

.switch.on::after {
  transform: translateX(18px);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  flex: 1;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s ease, opacity .15s ease;
}

.btn:active {
  transform: scale(.98);
}

.btn.primary {
  background: linear-gradient(140deg, #c62a30, #96131a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(156, 20, 24, .9);
}

.btn.danger {
  color: var(--red);
  border-color: #f2d7d5;
  background: #fffafa;
}

.btn[disabled] {
  opacity: .55;
}

/* 字号调节 */
.fontsize-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.fs-opt {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #faf9f7;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-2);
}

.fs-opt.on {
  border-color: #ebaaa6;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  background: rgba(30, 24, 22, .9);
  color: #fff;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 999px;
  z-index: 120;
  max-width: 78vw;
  text-align: center;
  line-height: 1.5;
  animation: bubbleIn .2s ease;
  pointer-events: none;
}

.toast[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------ 「体验优化」卡片内边距 */
.switch-row.in-card {
  padding: 13px 15px;
}

.switch-row.in-card .sw-label {
  font-size: 13.5px;
  line-height: 1.45;
}

.switch-row.in-card .sw-label small {
  margin-top: 3px;
  font-size: 11px;
  color: #8b929c;
}

/* 开关与右边界留白，避免贴边 */
.switch-row.in-card .switch {
  margin-right: 1px;
}

/* ------------------------------------------------------ 收银台（在线缴费） */
.pay-loading {
  padding: 22px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

.pay-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 0 14px;
  background: linear-gradient(180deg, #fdf6f5, #fff);
  border: 1px solid #f3e3e2;
  border-radius: 14px;
}

.pay-amount small {
  font-size: 11.5px;
  color: var(--ink-3);
}

.pay-amount b {
  font-size: 30px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}

.pay-ch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.pay-ch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #eeece7;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.pay-ch-item i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f6f5f2;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.pay-ch-item.on {
  border-color: #e2a6a3;
  background: #fdf7f6;
}

.pay-ch-item.on i {
  background: var(--red);
  color: #fff;
}

/* ------------------------------------------------------ 未登录 / 无权限 */
.cell.is-locked {
  color: #9aa0ab;
}

.cell.is-locked .c-icon {
  background: #f7f6f3;
  color: #b6bbc2;
}

.cell .c-lock {
  font-size: 9.5px;
  font-weight: 600;
  color: #9aa0ab;
  background: #f2f1ed;
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 2px;
  flex: none;
  white-space: nowrap;
}

.cell .c-lock.on {
  color: var(--red);
  background: var(--red-soft);
}

.mine-tip {
  margin: 0 15px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fbf7f0;
  border: 1px solid #f3e8d4;
  font-size: 11.5px;
  line-height: 1.7;
  color: #7a6547;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.mine-tip svg {
  width: 13px;
  height: 13px;
  flex: none;
  margin-top: 2px;
  color: #b98a3c;
}

.mine-tip b {
  color: #96631c;
}

.mine-tip .mine-login {
  border: 0;
  background: transparent;
  color: var(--red);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* 我的党费卡片 */
.mine-fee {
  margin: 0 15px 14px;
  padding: 13px 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, #fdf4f3, #fff 70%);
  border: 1px solid #f4e2e1;
}

.mine-fee-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #7a828c;
}

.mine-fee-top b {
  color: var(--ink);
  font-size: 13px;
}

.mine-fee-amt {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 6px 0 2px;
}

.mine-fee-amt b {
  font-size: 25px;
  font-weight: 800;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.mine-fee-amt small {
  font-size: 11px;
  color: #98a0aa;
}

.mine-fee-btn {
  width: 100%;
  margin-top: 10px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #c62a30, #9c1418);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 0;
  cursor: pointer;
}

.mine-fee-btn.done {
  background: #f0eeea;
  color: #7c848e;
  cursor: default;
}

.mine-fee-note {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.6;
  color: #98a0aa;
}

/* ==========================================================================
   AI党群助手 · 首页入口 & 开启页
   ========================================================================== */
.dq-mascot { display: block; overflow: visible; }

/* ---------------- 首页入口横幅 ---------------- */
.dq-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px 12px 16px 16px;
  margin: 0 0 14px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: #fff;
  font-family: inherit;
  background:
    radial-gradient(130% 150% at 104% -10%, #f4705f 0%, #cc2226 44%, #9c1418 100%);
  box-shadow: 0 12px 26px -14px rgba(140, 15, 20, .75);
}

.dq-banner:active { transform: scale(.995); }

.dq-banner-glow {
  position: absolute;
  right: -46px;
  top: -58px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 150, .55), rgba(255, 190, 110, 0) 62%);
  pointer-events: none;
}

.dq-banner-txt {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dq-banner-kicker {
  font-size: 10.5px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .8);
}

.dq-banner-title {
  margin-top: 5px;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.3;
}

.dq-banner-sub {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .76);
}

.dq-banner-btn {
  margin-top: 11px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #8a3d06;
  background: linear-gradient(135deg, #ffe8af, #f3c66b 52%, #e3a63a);
  box-shadow: 0 6px 13px rgba(90, 40, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .7);
}

.dq-banner-btn i { font-style: normal; }

.dq-banner-face {
  position: relative;
  z-index: 2;
  flex: none;
  margin: -8px -10px -12px 0;
  filter: drop-shadow(0 10px 16px rgba(60, 0, 0, .38));
  animation: dqFloat 5s ease-in-out infinite;
}

/* ---------------- 开启页 ---------------- */
.dq-splash {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: calc(8px + var(--safe-t)) 26px calc(20px + var(--safe-b));
  color: #fff;
  background: radial-gradient(122% 62% at 50% 12%, #f0533f 0%, #d81f24 40%, #ab1116 76%, #82090e 100%);
}

.dq-splash::-webkit-scrollbar { width: 0; height: 0; }

.dq-dots {
  position: absolute;
  inset: 22% 0 auto;
  height: 52%;
  opacity: .6;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 13px 13px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.dq-halo {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 440px;
  height: 440px;
  margin-left: -220px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 150, .42), rgba(255, 190, 110, 0) 62%);
}

.dq-topbar {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
}

.dq-back {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(4px);
}

.dq-back svg { width: 16px; height: 16px; }

.dq-topbar-title {
  font-size: 13px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .82);
}

.dq-topbar-pad { width: 34px; }

.dq-emblem {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 2px 0 16px 4px;
  align-self: flex-start;
  z-index: 3;
  flex: none;
}

.dq-emblem-ring {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 224, 160, .45);
  border-radius: 50%;
}

.dq-emblem-star {
  position: absolute;
  inset: 0;
  display: block;
  color: #f8d27c;
  filter: drop-shadow(0 2px 6px rgba(120, 40, 0, .4));
}

.dq-emblem-star svg { width: 100%; height: 100%; display: block; }

.dq-brand {
  position: relative;
  z-index: 3;
  font-size: 33px;
  font-weight: 800;
  letter-spacing: .12em;
  text-shadow: 0 4px 12px rgba(120, 0, 0, .4);
  flex: none;
}

.dq-brand-sub {
  position: relative;
  z-index: 3;
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .9);
  flex: none;
}

.dq-hero {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 232px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dq-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 244px;
  height: 244px;
  margin: -122px 0 0 -122px;
  border: 1px solid rgba(255, 235, 200, .26);
  border-radius: 50%;
}

.dq-ring::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px dashed rgba(255, 235, 200, .16);
  border-radius: 50%;
}

.dq-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 186px;
  height: 38px;
  margin: 72px 0 0 -93px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 226, 160, .8), rgba(255, 190, 110, 0));
}

.dq-float {
  position: relative;
  z-index: 3;
  animation: dqFloat 5s ease-in-out infinite;
}

.dq-orb {
  position: absolute;
  border-radius: 9px;
  transform: rotate(-12deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .14));
  border: 1px solid rgba(255, 255, 255, .34);
  backdrop-filter: blur(3px);
}

.dq-orb-a { left: 2px; top: 34px; width: 54px; height: 38px; }
.dq-orb-b { right: 4px; top: 88px; width: 44px; height: 44px; border-radius: 13px; transform: rotate(14deg); }

@keyframes dqFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.dq-cta {
  flex: none;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #8a3d06;
  background: linear-gradient(135deg, #fbe3a4, #f4c96f 45%, #e8a93c);
  box-shadow: 0 9px 20px rgba(110, 50, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .72);
}

.dq-cta span { margin-left: 8px; }
.dq-cta:active { transform: translateY(1px); }

.dq-resume {
  flex: none;
  margin-top: 12px;
  max-width: 100%;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .32);
  text-underline-offset: 3px;
}

.dq-quick {
  flex: none;
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.dq-quick::-webkit-scrollbar { width: 0; height: 0; }

.dq-chip {
  flex: none;
  max-width: 78%;
  height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .92);
  font-family: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.dq-foot {
  flex: none;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .55);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .dq-float, .dq-banner-face { animation: none; }
}

/* ==========================================================================
   语音输入 · 输入法键盘指引面板
   （浏览器语音识别依赖 Google 引擎，国内多数环境不可用 → 引导用输入法语音键）
   ========================================================================== */
.kb-demo {
  margin: 4px 0 14px;
  padding: 10px 10px 11px;
  border: 1px solid #e6e2da;
  border-radius: 16px;
  background: linear-gradient(180deg, #f5f3ef, #eae7e1);
}

.kb-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 31, 36, .06);
}

.kb-mic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  border-radius: 50%;
  color: #8a3d06;
  background: linear-gradient(135deg, #f7d68f, #e3a63a);
  box-shadow: 0 0 0 4px rgba(227, 167, 58, .16);
}

.kb-mic svg { width: 13px; height: 13px; }

.kb-bar-txt {
  order: -1;
  font-size: 11.5px;
  color: var(--ink-3);
}

.kb-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.kb-row-last { margin-bottom: 0; }

.kb-row i {
  flex: 1;
  height: 21px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(170, 163, 152, .55);
}

.kb-row i.wide { flex: 2.6; }
.kb-row i.wide2 { flex: 1.5; }

.kb-row i.mic-key {
  flex: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a3d06;
  background: linear-gradient(135deg, #fbe3a4, #e8a93c);
  box-shadow: 0 1px 0 rgba(150, 100, 20, .35);
  animation: kbPulse 2s ease-in-out infinite;
}

.kb-row i.mic-key svg { width: 12px; height: 12px; }

@keyframes kbPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227, 167, 58, .55); }
  55% { box-shadow: 0 0 0 5px rgba(227, 167, 58, 0); }
}

.ime-steps {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  counter-reset: ime;
}

.ime-steps li {
  position: relative;
  margin-bottom: 11px;
  padding-left: 29px;
  counter-increment: ime;
}

.ime-steps li:last-child { margin-bottom: 0; }

.ime-steps li::before {
  content: counter(ime);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
}

.ime-steps b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

.ime-steps span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.62;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .kb-row i.mic-key { animation: none; }
}

/* ============ 西小服 · 机器人吉祥物（与西小服 H5 同款） ============ */
.xsf-mascot { position: relative; flex: none; display: inline-block; }
.xsf-mascot .xsf-ear { position: absolute; width: 18%; height: 26%; top: 16%; border-radius: 50%; background: linear-gradient(160deg, #8a6ad6, #6b4bb8); z-index: 1; }
.xsf-mascot .xsf-ear.l { left: 0; }
.xsf-mascot .xsf-ear.r { right: 0; }
.xsf-mascot .xsf-head { position: absolute; left: 7%; top: 2%; width: 86%; height: 62%; background: linear-gradient(165deg, #fff 30%, #eef2ff); border-radius: 34% 34% 40% 40% / 40% 40% 38% 38%; box-shadow: 0 6px 12px rgba(80, 40, 20, .18), inset 0 -4px 8px rgba(120, 120, 200, .12); z-index: 2; }
.xsf-mascot .xsf-face { position: absolute; z-index: 3; left: 9%; top: 12%; width: 82%; height: 70%; background: linear-gradient(180deg, #7d4c3b, #5c332a); border-radius: 38% 38% 44% 44% / 42% 42% 46% 46%; }
.xsf-mascot .xsf-eyes { position: absolute; inset: 26% 18% auto; height: 24%; display: flex; justify-content: space-around; align-items: center; }
.xsf-mascot .xsf-eyes i { width: 17%; aspect-ratio: 1 / 1; min-width: 3px; min-height: 3px; background: #fff; border-radius: 50%; }
.xsf-mascot .xsf-smile { position: absolute; left: 50%; bottom: 14%; width: 24%; height: 12%; margin-left: -12%; border-bottom: 2px solid #fff; border-radius: 0 0 60% 60%; opacity: .92; }
.xsf-mascot .xsf-body { position: absolute; left: 22%; top: 58%; width: 56%; height: 30%; background: linear-gradient(180deg, #fff 10%, #e8ecff); border-radius: 30% 30% 24% 24% / 34% 34% 26% 26%; }
.xsf-mascot .xsf-star { position: absolute; left: 42%; top: 66%; width: 16%; height: 16%; background: linear-gradient(160deg, #f9d36a, #e8a92c); border-radius: 50%; z-index: 3; }

/* 助手「图标字」头像（西小服以外的助手沿用） */
.mark-ava { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-weight: 700; font-family: "Songti SC", "STSong", serif; flex: none; }

/* 平台 Logo 图标（统一助手图标） */
.mark-logo {
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30%;
  overflow: hidden;
  flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .07);
}

.mark-logo img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

/* ============ 西小服对话页（与西小服 H5 同款） ============ */
.xsf-head {
  flex: none;
  padding: var(--safe-t) 14px 12px;
  background: radial-gradient(120% 90% at 50% 0%, #e14b38 0%, #d81f24 46%, #b01218 100%);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 5px 14px rgba(180, 25, 25, .24);
  color: #fff;
}
.xsf-nav { height: 36px; display: flex; align-items: center; }
.xsf-back { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: none; border: 0; cursor: pointer; opacity: .92; flex: none; }
.xsf-nav-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.xsf-pills { display: flex; gap: 6px; }
.xsf-pill { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-size: 11px; cursor: pointer; font-family: inherit; }
.xsf-greet { display: flex; align-items: center; gap: 8px; padding: 6px 2px 0; }
.xsf-greet-txt { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.xsf-greet-tag { margin-left: auto; padding: 3px 8px; border-radius: 4px; background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .9); font-size: 10px; flex: none; }

.xsf-welcome { max-width: 100%; }
.xsf-welcome-text { font-size: 14px; line-height: 1.72; }
.q-item .m { color: var(--red); font-size: 11px; flex: none; }
.q-item .qt { flex: 1; text-align: left; }

.xsf-grid { margin-top: 12px; background: #fff; border-radius: 14px; padding: 8px 4px; display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: 0 4px 13px rgba(150, 96, 60, .07); }
.xsf-feat { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 0; font-size: 11px; color: #5c534b; background: none; border: 0; cursor: pointer; font-family: inherit; }
.xsf-feat:active { opacity: .6; }
.xsf-feat .xsf-ico { color: var(--red); display: grid; place-items: center; }

.xsf-today { display: block; width: 100%; text-align: left; margin-top: 10px; padding: 12px 14px; border-radius: 12px; cursor: pointer; background: linear-gradient(135deg, #fff7f2, #fdece6); border: 1px solid #f7e0d7; font-family: inherit; }
.xsf-today .tk { font-size: 10.5px; color: #b98a6a; letter-spacing: .5px; }
.xsf-today .tt { margin-top: 4px; font-size: 14.5px; font-weight: 600; color: #7d3b28; }
.xsf-today .td { margin-top: 4px; font-size: 11.5px; color: #a8796c; }

.xsf-shortcuts { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 7px; padding-bottom: 2px; scrollbar-width: none; }
.xsf-shortcuts::-webkit-scrollbar { display: none; }
.xsf-sc { padding: 5px 11px; border-radius: 999px; background: #fdf3ef; color: #a8452f; font-size: 11px; white-space: nowrap; border: 0; cursor: pointer; font-family: inherit; flex: none; }
.xsf-sc.g { background: #f2f0ee; color: #7a7169; }

/* ============ 对话页欢迎区：功能宫格（与截图/西小服同款 4+3） ============ */
.xsf-grid { padding: 14px 4px 6px; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(150, 96, 60, .06); margin-top: 10px; }
.xsf-feat { gap: 9px; padding: 4px 0 14px; font-size: 13px; color: #3f3a35; }
.xf-ico { position: relative; width: 24px; height: 24px; flex: none; display: block; }
.xf-ico::before, .xf-ico::after { content: ''; position: absolute; }
.xf-ico.bars::before { inset: 12px 16px 4px 4px; border-left: 3px solid #c0392b; border-bottom: 3px solid #c0392b; }
.xf-ico.bars::after { left: 9px; top: 6px; width: 9px; height: 10px; background: #c0392b; border-radius: 1px; opacity: .82; }
.xf-ico.doc::before { inset: 4px 5px 3px 5px; border: 2px solid #c0392b; border-radius: 3px; }
.xf-ico.doc::after { left: 8px; top: 9px; width: 8px; height: 2px; background: #c0392b; box-shadow: 0 4px 0 #c0392b, 0 8px 0 rgba(192, 57, 43, .55); }
.xf-ico.book::before { left: 4px; top: 4px; width: 7px; height: 16px; border: 2px solid #c0392b; border-radius: 2px 4px 4px 2px; }
.xf-ico.book::after { right: 4px; top: 4px; width: 7px; height: 16px; border: 2px solid #c0392b; border-radius: 4px 2px 2px 4px; }
.xf-ico.check::before { inset: 3px 5px; border: 2px solid #c0392b; border-radius: 3px; }
.xf-ico.check::after { left: 9px; top: 8px; width: 5px; height: 9px; border-right: 2px solid #c0392b; border-bottom: 2px solid #c0392b; transform: rotate(42deg); }
.xf-ico.pen::before { left: 11px; top: 2px; width: 5px; height: 16px; background: #c0392b; border-radius: 3px 3px 0 0; transform: rotate(38deg); }
.xf-ico.pen::after { right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: #e8a92c; box-shadow: -5px 8px 0 -1px #e8a92c; }
.xf-ico.pin::before { left: 6px; top: 2px; width: 12px; height: 12px; border: 2px solid #c0392b; border-radius: 50%; }
.xf-ico.pin::after { left: 9px; top: 12px; width: 6px; height: 6px; border-right: 2px solid #c0392b; border-bottom: 2px solid #c0392b; transform: rotate(45deg); }
.xf-ico.ava::before { left: 8px; top: 3px; width: 8px; height: 8px; border: 2px solid #c0392b; border-radius: 50%; }
.xf-ico.ava::after { left: 4px; bottom: 3px; width: 16px; height: 8px; border: 2px solid #c0392b; border-radius: 8px 8px 3px 3px; }

.xsf-today { margin-top: 12px; padding: 14px 16px 15px; border-radius: 12px; background: linear-gradient(135deg, #fdf3ee 0%, #fbe9e2 100%); border: 1px solid #f6e2d9; }
.xsf-today .tk { font-size: 12px; color: #b08a76; letter-spacing: .5px; }
.xsf-today .tt { margin-top: 8px; font-size: 18px; font-weight: 700; color: #7d3021; line-height: 1.45; }
.xsf-today .td { margin-top: 8px; font-size: 12.5px; color: #a9856f; }
.xsf-today .td i { font-style: normal; }

/* ============ 西小服输入栏（与参考站同款：米白胶囊 + 线条话筒 + 浅色圆钮） ============ */
.xsf-composer {
  background: #fff;
  border-top: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 13px rgba(150, 96, 60, .08);
  padding: 8px 12px calc(10px + var(--safe-b));
}
.xsf-composer .composer-row {
  align-items: center;
  gap: 6px;
  background: #f7f4f1;
  border-radius: 24px;
  padding: 4px 5px 4px 10px;
}
.xsf-composer .c-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  border-radius: 0;
  color: #b07a6a;
}
.xsf-composer .c-btn:active { background: none; transform: none; opacity: .6; }
.xsf-composer .c-btn svg { width: 21px; height: 21px; }
.xsf-composer .c-input { background: none; border: 0; border-radius: 0; }
.xsf-composer .c-input textarea { background: none; font-size: 14px; padding: 8px 2px; color: var(--ink); }
.xsf-composer .c-input textarea::placeholder { color: #b3a89f; }
.xsf-composer .send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6ded8;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.xsf-composer .send-btn:active { transform: scale(.95); }
.xsf-composer .send-btn.stop { background: #e6ded8; color: #fff; }
.xsf-composer .send-btn svg { width: 16px; height: 16px; color: #fff; }
.xsf-composer .composer-hint { color: #b3a89f; text-align: center; font-size: 10.5px; padding-top: 7px; }

/* ==========================================================================
   西小服 · 功能页（学习 / 每日一测 / AI 写作 / 党群地图 / 支部画像）
   版式对齐 114.132.180.249:28089（西小服 H5）
   ========================================================================== */

/* ---------- 通用页头 / 返回 ---------- */
.xp-head { display: flex; align-items: center; gap: 6px; padding-left: 12px; }
.xp-back { width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.xp-back svg { width: 20px; height: 20px; }
.xp-back.light { color: #fff; opacity: .92; }
.xp-pad { padding: 14px 16px 0; }

/* ---------- 学习中心 ---------- */
.xp-tabs { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.xp-tabs::-webkit-scrollbar { display: none; }
.xp-tab { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid #eee6df; background: #faf8f6; color: #6b6259; font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.xp-tab.on { background: linear-gradient(140deg, #c62a30, #96131a); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 6px 14px -8px rgba(156, 20, 24, .9); }

.xp-intro { margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, #fdf6ee, #fbf0e4); border: 1px solid #f3e6d4; }
.xp-intro .t { font-size: 12.5px; font-weight: 700; color: #a4762f; }
.xp-intro .d { margin-top: 4px; font-size: 11.5px; color: #a08a70; line-height: 1.65; }

.xp-art { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 10px rgba(27, 31, 36, .045); margin-bottom: 11px; cursor: pointer; }
.xp-art:active { opacity: .92; }
.xp-tag { display: inline-block; font-size: 10.5px; color: #a8452f; background: #fbe9e7; padding: 2px 7px; border-radius: 4px; }
.xp-tag.light { background: rgba(255, 255, 255, .2); color: #fff; margin-top: 12px; }
.xp-art-ttl { margin-top: 8px; font-size: 15.5px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.xp-art-sum { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xp-art-foot { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xp-meta { font-size: 11px; color: var(--ink-3); }
.xp-ask { border: 0; background: none; color: var(--red); font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; padding: 0; }
.xp-end { text-align: center; font-size: 11px; color: #c0b6ac; padding: 14px 0 22px; }
.xp-empty { padding: 50px 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }

/* ---------- 学习详情 ---------- */
.xp-dhead { flex: none; position: relative; padding: calc(14px + var(--safe-t)) 18px 18px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(227, 183, 120, .28), transparent 55%),
              linear-gradient(140deg, #b81e24 0%, #9c1418 52%, #7d0f13 100%); }
.xp-dhead .xp-back { position: absolute; left: 8px; top: calc(8px + var(--safe-t)); }
.xp-dhead-ttl { margin-top: 8px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.xp-dhead-meta { margin-top: 7px; font-size: 11px; color: rgba(255, 255, 255, .78); }

.xp-card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 10px rgba(27, 31, 36, .045); }
.xp-card-ttl { font-size: 14px; font-weight: 700; margin-bottom: 11px; }
.xp-card-ttl.between { display: flex; align-items: center; justify-content: space-between; }
.xp-para { margin: 0 0 11px; font-size: 13.5px; line-height: 1.85; color: #33383f; text-align: justify; }
.xp-para:last-child { margin-bottom: 0; }
.xp-pt { display: flex; gap: 9px; padding: 5px 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.xp-pt i { width: 19px; height: 19px; border-radius: 50%; background: #fbe9e7; color: #a8452f; font-size: 11px; font-style: normal; display: grid; place-items: center; flex: none; margin-top: 2px; }
.xp-src { text-align: center; font-size: 11px; color: var(--ink-3); padding: 14px 0 8px; }
.xp-fixedbar { flex: none; display: flex; gap: 10px; padding: 10px 16px calc(10px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); }

/* ---------- 每日一测 ---------- */
.xp-qhead { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-t)) 18px 16px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(227, 183, 120, .26), transparent 55%),
              linear-gradient(140deg, #b81e24 0%, #9c1418 52%, #7d0f13 100%); }
.xp-qhead-l { flex: 1; min-width: 0; }
.xp-qhead-l .t { font-size: 17px; font-weight: 700; }
.xp-qhead-l .s { margin-top: 3px; font-size: 11px; color: rgba(255, 255, 255, .78); }
.xp-qhead-p { flex: none; display: flex; align-items: baseline; gap: 1px; }
.xp-qhead-p b { font-size: 22px; }
.xp-qhead-p span { font-size: 12px; opacity: .8; }

.xp-steps { display: flex; gap: 6px; margin-bottom: 12px; }
.xp-steps i { flex: 1; height: 4px; border-radius: 2px; background: #eee7e0; }
.xp-steps i.on { background: linear-gradient(90deg, #d8452f, #b81e24); }
.xp-qtag { font-size: 10.5px; color: #a8452f; background: #fbe9e7; display: inline-block; padding: 2px 7px; border-radius: 4px; }
.xp-qtext { margin-top: 9px; font-size: 15px; line-height: 1.65; font-weight: 600; }
.xp-opts { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.xp-opt { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-radius: 12px; border: 1px solid #f0e8e1; background: #fff; text-align: left; font-family: inherit; font-size: 14px; color: #3a332e; cursor: pointer; }
.xp-opt i { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #f7f3ef; color: #8a7f76; font-size: 12px; font-style: normal; font-weight: 600; display: grid; place-items: center; }
.xp-opt.picked { border-color: #e8a6a0; background: #fdf5f3; }
.xp-opt.picked i { background: var(--red); color: #fff; }
.xp-opt.right { border-color: #a9d4b4; background: #f3faf5; }
.xp-opt.right i { background: #4f9b62; color: #fff; }
.xp-opt.wrong { border-color: #e08b83; background: #fdf3f2; }
.xp-opt.wrong i { background: #c9584d; color: #fff; }
.xp-explain { margin-top: 12px; }
.xp-eh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.xp-flag { padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.xp-flag.ok { background: #e8f6eb; color: #3f8a52; }
.xp-flag.no { background: #fdecea; color: #b23a2e; }
.xp-et { font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.xp-ea { margin-top: 9px; padding: 9px 0 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--red); font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.xp-qfoot { padding: 16px 0 28px; display: flex; flex-direction: column; }
.xp-qfoot .btn { width: 100%; flex: none; }
.xp-streak { text-align: center; font-size: 12px; color: #d08c2a; padding-top: 10px; }

.xp-finish { padding: 56px 28px 30px; display: flex; flex-direction: column; align-items: center; }
.xp-ring { width: 150px; height: 150px; border-radius: 50%; background: linear-gradient(160deg, #fff2ef, #fbdad4); border: 4px solid #f6c9c2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.xp-ring b { font-size: 32px; font-weight: 800; color: var(--red); }
.xp-ring span { font-size: 12px; color: #a8796c; margin-top: 3px; }
.xp-finish-ttl { margin-top: 18px; font-size: 17px; font-weight: 700; }
.xp-finish-sub { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.xp-finish-acts { display: flex; gap: 12px; margin-top: 24px; width: 100%; }

/* ---------- AI 写作 ---------- */
.xp-whero { margin: 4px 0 14px; padding: 17px 16px; border-radius: 15px; background: linear-gradient(135deg, #fff3ee, #fbe3dd); }
.xp-whero .t { font-size: 20px; font-weight: 800; color: #a8452f; letter-spacing: .5px; }
.xp-whero .s { margin-top: 5px; font-size: 12px; color: #a8796c; }
.xp-sec { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 14px 0 8px; }
.xp-sec-between { display: flex; align-items: center; justify-content: space-between; }
.xp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xp-chip { padding: 7px 13px; border-radius: 999px; border: 1px solid #f0e6de; background: #fff; color: #6b6259; font-size: 13px; font-family: inherit; cursor: pointer; }
.xp-chip.on { border-color: #e8a6a0; background: #fdf5f3; color: var(--red); font-weight: 600; }
.xp-form { padding: 2px 14px; }
.xp-form input, .xp-form textarea { width: 100%; border: 0; outline: none; font-size: 14px; color: var(--ink); font-family: inherit; background: none; }
.xp-form input { height: 46px; }
.xp-form textarea { min-height: 70px; padding: 10px 0; line-height: 1.7; resize: none; }
.xp-form input::placeholder, .xp-form textarea::placeholder { color: #b3a89f; }
.xp-form hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.xp-lens { display: flex; gap: 9px; }
.xp-len { flex: 1; background: #fff; border: 1px solid #f0e6de; border-radius: 10px; padding: 11px 5px; text-align: center; cursor: pointer; }
.xp-len.on { border-color: #e8a6a0; background: #fdf5f3; }
.xp-len .n { font-size: 13.5px; font-weight: 600; }
.xp-len.on .n { color: var(--red); }
.xp-len .d { margin-top: 3px; font-size: 10.5px; color: var(--ink-3); }
.xp-genwrap { margin-top: 16px; display: flex; }
.xp-genwrap .btn { width: 100%; }
.xp-out { margin-top: 4px; min-height: 64px; }
.xp-out-empty { color: var(--ink-3); font-size: 13px; }
.xp-md { font-size: 13.5px; line-height: 1.85; color: #33383f; }
.xp-md p { margin: 0 0 9px; }
.xp-md h1, .xp-md h2, .xp-md h3 { margin: 12px 0 8px; line-height: 1.45; }
.xp-md ul, .xp-md ol { padding-left: 20px; margin: 0 0 9px; }
.xp-outacts { display: flex; gap: 10px; margin-top: 12px; }
.xp-genstatus { font-size: 11px; color: var(--red); font-weight: 400; }
.xp-foot-note { margin: 18px 0 0; text-align: center; font-size: 10.5px; color: #b3a89f; }

/* ---------- 党群地图 ---------- */
.xp-mapcanvas { position: relative; height: 250px; flex: none; background: linear-gradient(160deg, #f6efe9, #efe4db); overflow: hidden; }
.xp-mapcanvas svg { width: 100%; height: 100%; display: block; }
.xp-maphint { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 7px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(150, 96, 60, .12); font-size: 11.5px; font-weight: 600; color: #7d3b28; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-maptip { position: absolute; right: 12px; bottom: 12px; font-size: 10px; color: #b3a396; background: rgba(255, 255, 255, .7); padding: 3px 8px; border-radius: 5px; }
.xp-maplist { background: #fff; border-radius: 16px 16px 0 0; margin-top: -12px; padding: 14px 16px calc(16px + var(--safe-b)); position: relative; box-shadow: 0 -4px 13px rgba(150, 96, 60, .1); min-height: 320px; }
.xp-mitem { display: flex; gap: 10px; padding: 12px 10px; border-radius: 10px; border: 1px solid transparent; background: #faf8f6; margin-bottom: 8px; cursor: pointer; }
.xp-mitem.on { background: #fdf5f3; border-color: #f0d5cf; }
.xp-mitem .l { flex: 1; min-width: 0; }
.xp-mitem .n { font-size: 14.5px; font-weight: 600; }
.xp-mitem .a { margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.xp-mitem .h { margin-top: 3px; font-size: 11px; color: var(--ink-3); }
.xp-mitem .r { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }
.xp-mitem .ty { font-size: 10px; color: #a8452f; background: #fbe9e7; padding: 2px 6px; border-radius: 3px; }
.xp-mitem .call { font-size: 11px; color: #fff; background: linear-gradient(140deg, #c62a30, #96131a); padding: 4px 10px; border-radius: 999px; border: 0; cursor: pointer; font-family: inherit; }

/* ---------- 支部画像 ---------- */
.xp-phead { flex: none; position: relative; padding: calc(14px + var(--safe-t)) 18px 30px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(227, 183, 120, .26), transparent 55%),
              linear-gradient(140deg, #b81e24 0%, #9c1418 52%, #7d0f13 100%); }
.xp-phead .xp-back { position: absolute; left: 8px; top: calc(8px + var(--safe-t)); }
.xp-phead .org { font-size: 19px; font-weight: 800; margin-top: 24px; }
.xp-phead .role { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .8); }
.xp-pstats { margin-top: 16px; display: flex; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px; padding: 11px 0; }
.xp-pstat { flex: 1; text-align: center; }
.xp-pstat b { font-size: 19px; }
.xp-pstat b i { font-size: 10px; font-weight: 400; font-style: normal; opacity: .85; margin-left: 1px; }
.xp-pstat span { display: block; margin-top: 2px; font-size: 10px; color: rgba(255, 255, 255, .78); }
.xp-pbody { margin-top: -17px; padding: 0 16px 28px; display: flex; flex-direction: column; gap: 11px; }
.xp-rate { margin-bottom: 10px; }
.xp-rate:last-child { margin-bottom: 0; }
.xp-rate .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.xp-rate .top b { color: var(--red); }
.xp-track { height: 7px; border-radius: 4px; background: #f4eee9; overflow: hidden; }
.xp-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f0a06a, #d8452f); }
.xp-rk { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.xp-rk i { width: 20px; height: 20px; border-radius: 50%; background: #f5f1ed; color: #9a8f86; font-size: 11px; font-style: normal; display: grid; place-items: center; flex: none; }
.xp-rk i.top { background: linear-gradient(160deg, #fbd98d, #e8a92c); color: #7a4a06; font-weight: 700; }
.xp-rk .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-rk b { color: var(--ink-2); }
.xp-aicard { background: linear-gradient(150deg, #fffdfb, #fdf4ef); }
.xp-aibtn { font-size: 11px; color: #fff; background: linear-gradient(140deg, #c62a30, #96131a); padding: 4px 11px; border-radius: 999px; border: 0; font-family: inherit; cursor: pointer; }
.xp-aitxt { font-size: 12.5px; line-height: 1.78; color: var(--ink-2); }
.xp-aiask { margin-top: 10px; padding: 8px 0 0; border: 0; border-top: 1px solid #f2e6df; background: none; width: 100%; text-align: left; font-size: 12.5px; color: var(--red); font-weight: 600; font-family: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- 语音输入（recorder.js）
   录音面板：波形 + 计时 + 大麦克风，识别结果直接写回输入框 */
.rec-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 0;
}

.rec-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 46px;
  width: 100%;
  padding: 0 6px;
}

.rec-wave i {
  flex: 1;
  max-width: 5px;
  height: 46px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e8705f, #c1272d);
  transform: scaleY(.16);
  transform-origin: center;
  transition: transform .1s linear;
}

.rec-wrap[data-state="recording"] .rec-wave i {
  background: linear-gradient(180deg, #e0574e, #a81f26);
}

.rec-wrap[data-state="busy"] .rec-wave i {
  opacity: .45;
}

.rec-time {
  margin: 8px 0 14px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.rec-mic {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(148deg, #d94a44, #a81f26);
  box-shadow: 0 16px 30px -14px rgba(168, 31, 38, .75);
  cursor: pointer;
  position: relative;
  transition: transform .16s ease, box-shadow .2s ease;
}

.rec-mic:active {
  transform: scale(.95);
}

.rec-mic svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.7;
}

.rec-wrap[data-state="recording"] .rec-mic {
  background: linear-gradient(148deg, #c1272d, #7d0f13);
  box-shadow: 0 16px 34px -12px rgba(140, 16, 20, .85);
}

.rec-wrap[data-state="recording"] .rec-mic::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid rgba(193, 39, 45, .42);
  animation: recPulse 1.7s ease-out infinite;
}

@keyframes recPulse {
  from { transform: scale(1); opacity: .85; }
  to { transform: scale(1.36); opacity: 0; }
}

.rec-wrap[data-state="busy"] .rec-mic {
  opacity: .8;
  pointer-events: none;
}

.rec-tip {
  margin-top: 14px;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-3);
  text-align: center;
  padding: 0 10px;
}

.rec-wrap[data-state="error"] .rec-tip {
  color: #c1272d;
}

.rec-wrap[data-state="done"] .rec-tip {
  color: #1c8a55;
}

.rec-play {
  width: 100%;
  height: 34px;
  margin-top: 10px;
}

.rec-alt {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
}

.rec-alt a {
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rec-alt a + a { margin-left: 16px; }

.rec-warn {
  margin: 4px 0 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #f3e2d6;
  background: #fdf6f0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.rec-warn b { color: #c1272d; }

a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
