/* IDCA cart AI — aligned with /public/ai (云脉智算对话首页) */
:root {
  --ica-bg: #f5f6f8;
  --ica-surface: #ffffff;
  --ica-border: #e8e9ed;
  --ica-text: #1f2329;
  --ica-text-2: #646a73;
  --ica-text-3: #8f959e;
  --ica-accent: var(--idca-primary, #3b82f6);
  --ica-accent-soft: #eff6ff;
  --ica-accent-hover: #2563eb;
  --ica-chip: #f0f1f4;
  --ica-radius: 20px;
}

body.idca-ca-page .page-content,
body.idca-ca-page .main-content,
body .page-content,
body .main-content,
body .container-fluid {
  background: var(--ica-bg) !important;
}

/* 锁死整页滚动：只允许消息区滑动 */
html.idca-cart-lock,
html.idca-cart-lock body,
body.idca-cart-page {
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}
body.idca-cart-page .main-content {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding-top: var(--idca-top-h, 56px) !important;
  box-sizing: border-box !important;
}
body.idca-cart-page .page-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin-top: 0 !important;
  height: auto !important;
  max-height: none !important;
}
/* 只藏第一个页头容器；第二个才是购物车内容 */
body.idca-cart-page .page-content > .container-fluid:first-of-type {
  display: none !important;
}
body.idca-cart-page .page-title-box {
  display: none !important;
}
body.idca-cart-page .page-content > .container-fluid:last-of-type {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.idca-cart {
  --c-primary: var(--ica-accent);
  box-sizing: border-box;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ica-text);
  background: var(--ica-bg);
  position: relative;
}

.idca-cart__main {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.idca-cart__stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.idca-cart__welcome {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 8px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.idca-cart__promo {
  position: absolute;
  top: 36px;
  right: 28px;
  z-index: 2;
  width: 108px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  transform: rotate(8deg);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  pointer-events: none;
  text-align: center;
}
.idca-cart__promo small {
  display: block;
  opacity: 0.88;
  font-weight: 500;
  margin-top: 4px;
  font-size: 11px;
}
.idca-cart__classic {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--ica-border);
  background: var(--ica-surface);
  color: var(--ica-text-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.idca-cart__classic:hover {
  color: var(--ica-accent);
  border-color: #bfdbfe;
  background: var(--ica-accent-soft);
}

.idca-cart__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin: 0 0 22px;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 0 20px;
  flex-shrink: 0;
  color: var(--ica-text);
}

.idca-cart__hot-head {
  width: 100%;
  max-width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 10px;
  box-sizing: border-box;
}
.idca-cart__hot-label {
  font-size: 13px;
  color: var(--ica-text-3);
  font-weight: 500;
}
.idca-cart__more {
  border: 0;
  background: none;
  color: var(--ica-text-3);
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}
.idca-cart__more:hover { color: var(--ica-accent); }

.idca-cart__hot {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: 10px;
  width: 100%;
  max-width: min(920px, 100%);
  margin: 0 auto;
  padding: 4px 20px 0;
  box-sizing: border-box;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.idca-cart__chip {
  border: none;
  background: var(--ica-chip);
  color: var(--ica-text);
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.idca-cart__chip:hover {
  background: #e4e7ec;
  color: var(--ica-accent-hover);
  transform: translateY(-1px);
}

.idca-cart__zones-panel {
  width: min(860px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
}
.idca-cart__zones-body {
  display: flex;
  min-height: 360px;
  max-height: min(560px, calc(100vh - 160px));
  border-top: 1px solid var(--ica-border);
}
.idca-cart__zones-l1 {
  flex: 0 0 200px;
  overflow-y: auto;
  border-right: 1px solid var(--ica-border);
  background: #f8f9fb;
  padding: 8px;
}
.idca-cart__zones-l1-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ica-text);
  cursor: pointer;
}
.idca-cart__zones-l1-item:hover { background: #eef2ff; }
.idca-cart__zones-l1-item.is-on {
  background: var(--ica-accent-soft);
  color: var(--ica-accent);
}
.idca-cart__zones-l2 {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: flex-start;
}
.idca-cart__zones-l2 .idca-cart__chip {
  width: 100%;
  max-width: none;
  flex: none;
}
.idca-cart__zones-empty {
  color: var(--ica-text-3);
  font-size: 13px;
  padding: 20px 8px;
}

@media (max-width: 900px) {
  .idca-cart__hot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
  }
}
@media (max-width: 767.98px) {
  body.idca-cart-page .main-content {
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
  }
  body.uc-app-page.idca-m-page.idca-cart-page .main-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .idca-cart__welcome {
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 48px 0 20px;
  }

  .idca-cart__classic {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
    margin: 0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    background: var(--ica-surface);
    border: 1px solid var(--ica-border);
  }

  .idca-cart__title {
    font-size: 22px;
    line-height: 1.35;
    margin: 0 16px 18px;
    padding: 0;
    text-align: center;
  }

  .idca-cart__promo { display: none !important; }

  .idca-cart__hot-head {
    width: 100%;
    max-width: 360px;
    padding: 0 0 10px;
    box-sizing: border-box;
  }

  /* 手机：固定 2 列 × 3 行 = 6 个，其余点「查看更多」 */
  .idca-cart__hot {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, auto);
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    overflow: visible;
  }

  .idca-cart__chip {
    width: 100% !important;
    max-width: none;
    min-height: 40px;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex !important;
    align-items: center;
    justify-content: center;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    font-size: 13px;
    line-height: 1.3;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
  }

  .idca-cart__hot > .idca-cart__chip:nth-child(n + 7) {
    display: none !important;
  }

  .idca-cart__composer-wrap {
    padding: 0 14px calc(8px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
  }
  body.uc-app-page.idca-m-page .idca-cart__composer-wrap {
    padding-bottom: calc(10px + var(--uc-tabbar-h, 50px) + env(safe-area-inset-bottom, 0px));
  }

  .idca-cart__composer {
    border-radius: 16px;
    padding: 12px 12px 10px;
  }

  .idca-cart__input {
    min-height: 48px !important;
    max-height: 96px;
    font-size: 14px;
    line-height: 1.45;
    padding: 4px 2px !important;
  }

  .idca-cart__toolbar { margin-top: 8px; }

  .idca-cart__badge--soft,
  .idca-cart__pill span {
    display: none !important;
  }

  .idca-cart__power {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.5;
  }

  .idca-cart__chat { padding: 12px 0 4px; }
  .idca-cart__msgs { padding: 0 12px 8px; gap: 12px; }
  .idca-cart__msg--bot {
    width: min(100%, calc(100% - 40px));
    max-width: min(100%, calc(100% - 40px));
    margin-left: 40px;
  }
  .idca-cart__avatar {
    left: -40px;
    width: 32px;
    height: 32px;
  }

  .idca-cart__modal-panel {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .idca-cart__zones-panel {
    max-height: calc(100dvh - 24px - var(--uc-tabbar-h, 0px));
  }
}

@media (max-width: 560px) {
  .idca-cart__hot {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 100%;
    padding: 0 14px;
    gap: 8px;
  }
  .idca-cart__hot-head {
    max-width: 100%;
    padding: 0 14px 10px;
  }
  .idca-cart__title { margin-left: 12px; margin-right: 12px; font-size: 20px; }
  .idca-cart__zones-body { flex-direction: column; min-height: 280px; }
  .idca-cart__zones-l1 {
    flex: 0 0 auto;
    max-height: 140px;
    border-right: 0;
    border-bottom: 1px solid var(--ica-border);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .idca-cart__zones-l1-item { white-space: nowrap; width: auto; }
  .idca-cart__zones-l2 {
    grid-template-columns: 1fr;
  }
}

/* chat messages */
.idca-cart__chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 0 8px;
  width: 100%;
}
.idca-cart__chat.is-hidden,
.idca-cart__welcome.is-hidden { display: none !important; }

.idca-cart__msgs {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 max(20px, calc((100% - 920px) / 2)) 8px;
  box-sizing: border-box;
  width: 100%;
}
.idca-cart__msg { max-width: min(720px, 100%); }
.idca-cart__msg--user {
  align-self: flex-end;
  width: fit-content;
  max-width: min(720px, 100%);
}
.idca-cart__msg--bot {
  align-self: flex-start;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: min(720px, calc(100% - 46px));
  max-width: min(720px, calc(100% - 46px));
  margin-left: 46px;
  position: relative;
  box-sizing: border-box;
}
.idca-cart__avatar {
  position: absolute;
  left: -46px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef2ff;
}
.idca-cart__col {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}
.idca-cart__bubble {
  padding: 12px 16px 0;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.65;
  background: var(--ica-surface);
  border: 1px solid var(--ica-border);
  color: var(--ica-text);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.idca-cart__msg--user .idca-cart__bubble { padding: 12px 16px; width: 100%; }
.idca-cart__answer { padding-bottom: 12px; }
.idca-cart__answer:empty { display: none; padding: 0; }
.idca-cart__offers {
  margin: 0 -16px 0;
  display: flex;
  flex-direction: column;
  width: calc(100% + 32px);
  border-top: 1px solid var(--ica-border);
  background: var(--ica-surface);
}
.idca-cart__offers.is-scroll {
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.idca-cart__offer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--ica-border);
  border-radius: 0;
  background: transparent;
  color: var(--ica-text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.idca-cart__offer:last-child { border-bottom: 0; }
.idca-cart__offer:hover {
  background: var(--ica-accent-soft);
}
.idca-cart__msg--user .idca-cart__bubble {
  background: var(--ica-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.22);
}
.idca-cart__bubble a { color: var(--ica-accent); }
.idca-cart__msg--user .idca-cart__bubble a { color: #fff; text-decoration: underline; }
.idca-cart__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.idca-cart__offer-main {
  flex: 1 1 auto;
  min-width: 0;
}
.idca-cart__offer-name {
  display: block;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ica-text);
  word-break: break-word;
}
.idca-cart__offer-price {
  flex: 0 0 auto;
  color: var(--ica-accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.idca-cart__offer-go {
  flex: 0 0 auto;
  color: var(--ica-text-3);
  font-size: 18px;
  line-height: 1;
}
.idca-cart__act {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: var(--ica-accent);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}
.idca-cart__act:hover { background: var(--ica-accent-hover); color: #fff !important; }
.idca-cart__act--ghost {
  background: #fff;
  color: var(--ica-accent) !important;
  border: 1px solid #bfdbfe;
}

/* composer — same structure as ym-composer */
.idca-cart__composer-wrap {
  width: 100%;
  max-width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 20px 12px;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.idca-cart__composer {
  background: var(--ica-surface);
  border: 1px solid var(--ica-border);
  border-radius: var(--ica-radius);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 12px 14px 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.idca-cart__composer:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12);
}

.idca-cart__input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ica-text);
  background: transparent;
  min-height: 52px;
  max-height: 160px;
  padding: 4px 4px 8px;
  box-sizing: border-box;
  font-family: inherit;
}
.idca-cart__input::placeholder { color: var(--ica-text-3); }

.idca-cart__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.idca-cart__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.idca-cart__badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ica-accent-soft);
  color: var(--ica-accent);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}
.idca-cart__badge--soft {
  background: #f0f1f4;
  color: var(--ica-text-2);
  border-color: transparent;
  font-weight: 500;
}
.idca-cart__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.idca-cart__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--ica-border);
  border-radius: 999px;
  background: #f5f6f8;
  font-size: 12px;
  color: var(--ica-text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.idca-cart__pill.is-on {
  background: var(--ica-accent-soft);
  border-color: #bfdbfe;
  color: var(--ica-accent);
}
.idca-cart__send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--ica-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
  flex-shrink: 0;
}
.idca-cart__send:hover:not(:disabled) {
  background: var(--ica-accent-hover);
  transform: scale(1.04);
}
.idca-cart__send:disabled { opacity: 0.4; cursor: not-allowed; }

.idca-cart__power {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--ica-text-3);
  line-height: 1.6;
}
.idca-cart__power a,
.idca-cart__tour-replay {
  color: var(--ica-accent);
  text-decoration: none;
}
.idca-cart__tour-replay {
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
.idca-cart__tour-replay:hover {
  color: var(--ica-accent-hover, #2563eb);
  text-decoration: underline;
}

/* dark / glass: keep chat surface readable */
html[data-theme="dark"] .idca-cart,
html[data-theme="glass"] .idca-cart {
  --ica-bg: #0f1115;
  --ica-surface: #1a1d24;
  --ica-border: #2a2f3a;
  --ica-text: #f3f4f6;
  --ica-text-2: #a1a8b3;
  --ica-text-3: #7b8494;
  --ica-chip: #232833;
  --ica-accent-soft: rgba(59, 130, 246, 0.16);
}
html[data-theme="dark"] body.idca-ca-page .page-content,
html[data-theme="dark"] body.idca-ca-page .main-content,
html[data-theme="glass"] body.idca-ca-page .page-content,
html[data-theme="glass"] body.idca-ca-page .main-content {
  background: #0f1115 !important;
}
html[data-theme="dark"] .idca-cart__classic,
html[data-theme="glass"] .idca-cart__classic {
  background: #1a1d24;
  border-color: #2a2f3a;
  color: #a1a8b3;
}
html[data-theme="dark"] .idca-cart__classic:hover,
html[data-theme="glass"] .idca-cart__classic:hover {
  color: #93c5fd;
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.16);
}
html[data-theme="dark"] .idca-cart__zones-l1,
html[data-theme="glass"] .idca-cart__zones-l1 {
  background: #151821;
  border-color: #2a2f3a;
}
html[data-theme="dark"] .idca-cart__zones-l1-item:hover,
html[data-theme="glass"] .idca-cart__zones-l1-item:hover {
  background: #232833;
}
html[data-theme="dark"] .idca-cart__zones-body,
html[data-theme="glass"] .idca-cart__zones-body {
  border-color: #2a2f3a;
}
html[data-theme="dark"] .idca-cart__pill,
html[data-theme="glass"] .idca-cart__pill {
  background: #232833;
}
html[data-theme="dark"] .idca-cart__offer,
html[data-theme="glass"] .idca-cart__offer {
  background: transparent;
  border-color: var(--ica-border);
}
html[data-theme="dark"] .idca-cart__offer:hover,
html[data-theme="glass"] .idca-cart__offer:hover {
  background: rgba(59, 130, 246, 0.16);
}


.idca-cart__act {
  font-family: inherit;
}
.idca-cart__bubble--stream {
  min-height: 0;
}
.idca-cart__cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--ica-accent);
  animation: idcaCartCursor 0.9s steps(1) infinite;
}
@keyframes idcaCartCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* config modal */
.idca-cart__modal[hidden] { display: none !important; }
.idca-cart__modal {
  position: fixed; inset: 0; z-index: 1400;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.idca-cart__modal-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.idca-cart__modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--ica-surface, #fff);
  border: 1px solid var(--ica-border, #e8e9ed);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  display: flex; flex-direction: column;
  animation: idcaCartModalIn .2s ease-out;
}
@keyframes idcaCartModalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.idca-cart__modal-hd {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 18px 18px 10px;
}
.idca-cart__modal-kicker {
  font-size: 12px; color: var(--ica-accent, #3b82f6); font-weight: 600; margin-bottom: 4px;
}
.idca-cart__modal-title {
  margin: 0; font-size: 18px; font-weight: 700; color: var(--ica-text, #1f2329);
}
.idca-cart__modal-sub {
  margin: 6px 0 0; font-size: 13px; color: var(--ica-text-2, #646a73); line-height: 1.45;
}
.idca-cart__modal-x {
  margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #f0f1f4; color: #646a73; font-size: 20px; line-height: 1; cursor: pointer;
}
.idca-cart__modal-x:hover { background: #e4e7ec; color: #111; }
.idca-cart__modal-body { padding: 8px 18px 12px; }
.idca-cart__modal-loading,
.idca-cart__modal-empty {
  padding: 28px 8px; text-align: center; color: var(--ica-text-3, #8f959e); font-size: 14px;
}
.idca-cart__cycle-list { display: flex; flex-direction: column; gap: 10px; }
.idca-cart__cycle {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  border: 1px solid var(--ica-border, #e8e9ed);
  background: #fafbfc;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-family: inherit; color: inherit;
}
.idca-cart__cycle:hover {
  border-color: #93c5fd; background: #f8fbff;
}
.idca-cart__cycle.is-on {
  border-color: var(--ica-accent, #3b82f6);
  background: var(--ica-accent-soft, #eff6ff);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.idca-cart__cycle-radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #c5cad3; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.idca-cart__cycle.is-on .idca-cart__cycle-radio {
  border-color: var(--ica-accent, #3b82f6);
}
.idca-cart__cycle.is-on .idca-cart__cycle-radio::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ica-accent, #3b82f6);
}
.idca-cart__cycle-meta { flex: 1; min-width: 0; }
.idca-cart__cycle-name { font-size: 14px; font-weight: 600; color: var(--ica-text, #1f2329); }
.idca-cart__cycle-desc { font-size: 12px; color: var(--ica-text-3, #8f959e); margin-top: 2px; }
.idca-cart__cycle-price {
  font-size: 15px; font-weight: 700; color: var(--ica-accent, #3b82f6); white-space: nowrap;
}
.idca-cart__cfgsec {
  margin: 0 0 16px;
}
.idca-cart__cfgsec-hd {
  font-size: 13px;
  font-weight: 600;
  color: var(--ica-text-2, #646a73);
  margin: 0 0 8px;
}
.idca-cart__cfghint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ica-text-3, #8f959e);
}
.idca-cart__optchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.idca-cart__optchip {
  border: 1px solid var(--ica-border, #e8e9ed);
  background: #fafbfc;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ica-text, #1f2329);
  transition: border-color .15s, background .15s;
}
.idca-cart__optchip:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.idca-cart__optchip.is-on {
  border-color: var(--ica-accent, #3b82f6);
  background: var(--ica-accent-soft, #eff6ff);
  color: var(--ica-accent, #3b82f6);
  font-weight: 600;
}
.idca-cart__select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--ica-border, #e8e9ed);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  color: inherit;
}
.idca-cart__qty {
  width: 120px;
  height: 40px;
  border: 1px solid var(--ica-border, #e8e9ed);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
}
.idca-cart__unit {
  font-size: 13px;
  color: var(--ica-text-3, #8f959e);
  margin-left: 6px;
}
.idca-cart__modal-ft {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--ica-border-soft, #eef0f3);
}
.idca-cart__modal-btn {
  height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--ica-accent, #3b82f6); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.idca-cart__modal-btn:disabled { opacity: .45; cursor: not-allowed; }
.idca-cart__modal-btn--ghost {
  background: #f0f1f4; color: var(--ica-text-2, #646a73);
}
.idca-cart__modal-btn--ghost:hover { background: #e4e7ec; }
.idca-cart__modal-btn:not(.idca-cart__modal-btn--ghost):hover:not(:disabled) {
  background: var(--ica-accent-hover, #2563eb);
}

/* hide site footer chrome on AI cart homepage */
body .footer.idca-footer,
body .footer,
body .idca-footer {
  display: none !important;
  border: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* AI thinking (like idca search) */
.idca-cart__think {
  margin: 0 0 10px;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  background: #fafbfc;
}
.idca-cart__think[hidden] { display: none !important; }
.idca-cart__think summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  color: #4e5969;
  display: flex;
  align-items: center;
  gap: 8px;
}
.idca-cart__think summary::-webkit-details-marker { display: none; }
.idca-cart__think summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #86909c;
  border-bottom: 1.5px solid #86909c;
  transform: rotate(-45deg);
  transition: transform .15s;
}
.idca-cart__think[open] summary::before { transform: rotate(45deg); }
.idca-cart__think-body {
  padding: 0 14px 12px;
  font-size: 12px;
  color: #86909c;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
}
.idca-cart__answer { min-height: 1.2em; }
html[data-theme="dark"] .idca-cart__think,
html[data-theme="glass"] .idca-cart__think {
  background: #232833;
  border-color: #2a2f3a;
}
html[data-theme="dark"] .idca-cart__think summary,
html[data-theme="glass"] .idca-cart__think summary,
html[data-theme="dark"] .idca-cart__think-body,
html[data-theme="glass"] .idca-cart__think-body {
  color: #a1a8b3;
}

/* in-chat payment card */
.idca-cart__pay {
  margin: 0 -16px;
  width: calc(100% + 32px);
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 2px 16px 14px;
}
.idca-cart__pay-hd {
  font-size: 12px;
  font-weight: 600;
  color: var(--ica-accent, #3b82f6);
  margin-bottom: 6px;
}
.idca-cart__pay-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ica-text, #1f2329);
  line-height: 1.4;
}
.idca-cart__pay-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ica-text-3, #8f959e);
}
.idca-cart__pay-cfg {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--ica-text-2, #646a73);
  line-height: 1.55;
}
.idca-cart__pay-total {
  margin-top: 12px;
  font-size: 22px;
  color: var(--ica-accent, #3b82f6);
}
.idca-cart__pay-total strong { font-weight: 800; }
.idca-cart__pay-gates {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px;
}
.idca-cart__pay-gate {
  border: 1px solid var(--ica-border, #e8e9ed);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ica-text-2, #646a73);
}
.idca-cart__pay-gate.is-on {
  border-color: var(--ica-accent, #3b82f6);
  background: var(--ica-accent-soft, #eff6ff);
  color: var(--ica-accent, #3b82f6);
  font-weight: 600;
}
.idca-cart__pay-area {
  margin-top: 12px;
  min-height: 48px;
  display: flex; flex-direction: column; align-items: center;
}
.idca-cart__pay-qr {
  width: 180px; height: 180px; object-fit: contain;
  border-radius: 8px; background: #fff;
}
.idca-cart__pay-qrbox {
  width: 168px;
  height: 168px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.idca-cart__pay-qrbox img,
.idca-cart__pay-qrbox canvas,
.idca-cart__pay-qrbox table {
  width: 168px !important;
  height: 168px !important;
}
.idca-cart__pay-wallet {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 0 4px;
}
.idca-cart__pay-wallet-bal {
  font-size: 13px;
  color: var(--ica-text-2, #646a73);
}
.idca-cart__pay-wallet-bal strong {
  color: var(--ica-text, #1f2329);
  font-weight: 700;
}
.idca-cart__pay-confirm {
  border: 0;
  background: var(--ica-accent, #3b82f6);
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.idca-cart__pay-confirm:disabled {
  opacity: .65;
  cursor: default;
}
.idca-cart__pay-obj { width: 200px; height: 210px; }
.idca-cart__pay-tip {
  margin: 0;
  font-size: 13px;
  color: var(--ica-text-3, #8f959e);
  text-align: center;
}
.idca-cart__pay-err {
  margin: 8px 0 0;
  font-size: 12px;
  color: #e11d48;
}
.idca-cart__pay-go {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 10px;
  height: 36px; padding: 0 16px;
  border-radius: 999px;
  background: var(--ica-accent, #3b82f6);
  color: #fff !important;
  font-size: 13px; font-weight: 600;
  text-decoration: none !important;
}
.idca-cart__pay-ok {
  font-size: 15px; font-weight: 700;
  color: #059669;
  margin-bottom: 8px;
}
.idca-cart__pay-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--ica-border-soft, #eef0f3);
}
.idca-cart__pay-link {
  font-size: 12px;
  color: var(--ica-accent, #3b82f6);
  text-decoration: none;
}
.idca-cart__pay-wait {
  font-size: 12px;
  color: var(--ica-text-3, #8f959e);
}
html[data-theme="dark"] .idca-cart__pay,
html[data-theme="glass"] .idca-cart__pay {
  background: #232833;
  border-color: #2a2f3a;
}
html[data-theme="dark"] .idca-cart__pay-gate,
html[data-theme="glass"] .idca-cart__pay-gate {
  background: #1c212b;
  border-color: #2a2f3a;
  color: #a1a8b3;
}

/* 新手引导 spotlight */
.idca-tour {
  position: fixed;
  inset: 0;
  z-index: 12000;
}
.idca-tour[hidden] { display: none !important; }
.idca-tour__start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
}
.idca-tour__start[hidden] { display: none !important; }
.idca-tour__start-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}
.idca-tour__start-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.idca-tour__start-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #1f2329;
}
.idca-tour__start-desc {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #646a73;
}
.idca-tour__start-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.idca-tour__start-go:hover { background: #2563eb; }
.idca-tour__start-skip {
  display: inline-flex;
  margin-top: 12px;
  border: 0;
  background: none;
  color: #8f959e;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.idca-tour__start-skip:hover { color: #1f2329; }
.idca-tour__done {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
  overflow: hidden;
}
.idca-tour__done[hidden] { display: none !important; }
.idca-tour__confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.idca-tour__done-card {
  position: relative;
  z-index: 2;
  width: min(400px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
  animation: idcaTourPop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes idcaTourPop {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.idca-tour__done-emoji {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 10px;
}
.idca-tour__done-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #1f2329;
}
.idca-tour__done-desc {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #646a73;
}
.idca-tour__done-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.idca-tour__done-go:hover { background: #2563eb; }
.idca-tour__guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.idca-tour__guide[hidden] { display: none !important; }
.idca-tour__hole {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.58);
  outline: 2px solid rgba(59, 130, 246, 0.95);
  outline-offset: 2px;
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease, border-radius 0.22s ease;
  pointer-events: none;
  z-index: 12001;
}
.idca-tour__tip {
  position: fixed;
  z-index: 12002;
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  color: #1f2329;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
  padding: 14px 14px 12px;
  pointer-events: auto;
  transition: top 0.22s ease, left 0.22s ease;
}
.idca-tour__tip-step {
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 6px;
}
.idca-tour__tip-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}
.idca-tour__tip-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #646a73;
}
.idca-tour__tip-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.idca-tour__tip-skip {
  border: 0;
  background: none;
  color: #8f959e;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.idca-tour__tip-skip:hover { color: #1f2329; }
.idca-tour__tip-next {
  border: 0;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
}
.idca-tour__tip-next:hover { background: #2563eb; }
html[data-theme="dark"] .idca-tour__tip,
html[data-theme="glass"] .idca-tour__tip,
html[data-theme="dark"] .idca-tour__start-card,
html[data-theme="glass"] .idca-tour__start-card,
html[data-theme="dark"] .idca-tour__done-card,
html[data-theme="glass"] .idca-tour__done-card {
  background: #1a1d24;
  color: #f3f4f6;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .idca-tour__start-title,
html[data-theme="glass"] .idca-tour__start-title,
html[data-theme="dark"] .idca-tour__done-title,
html[data-theme="glass"] .idca-tour__done-title { color: #f3f4f6; }
html[data-theme="dark"] .idca-tour__tip-desc,
html[data-theme="glass"] .idca-tour__tip-desc,
html[data-theme="dark"] .idca-tour__start-desc,
html[data-theme="glass"] .idca-tour__start-desc,
html[data-theme="dark"] .idca-tour__done-desc,
html[data-theme="glass"] .idca-tour__done-desc { color: #a1a8b3; }
html[data-theme="dark"] .idca-tour__tip-skip,
html[data-theme="glass"] .idca-tour__tip-skip,
html[data-theme="dark"] .idca-tour__start-skip,
html[data-theme="glass"] .idca-tour__start-skip { color: #7b8494; }
html[data-theme="dark"] .idca-tour__tip-skip:hover,
html[data-theme="glass"] .idca-tour__tip-skip:hover,
html[data-theme="dark"] .idca-tour__start-skip:hover,
html[data-theme="glass"] .idca-tour__start-skip:hover { color: #f3f4f6; }
html[data-theme="dark"] .idca-tour__start-badge,
html[data-theme="glass"] .idca-tour__start-badge {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}
[data-tour].is-tour-on {
  position: relative;
  z-index: 12003;
}
.idca-cart__classic.is-tour-on,
.idca-cart__promo.is-tour-on {
  position: absolute;
  width: max-content;
}

