/* 泰需要智能体：全站选择控件：白底黑边、选中红勾。保留原生 checked/disabled/form 行为。 */
:root {
  --txyai-checkbox-ink: #222222;
  --txyai-checkbox-red: #d41427;
  --txyai-checkbox-white: #ffffff;
}

:is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input),
.tyai-app #tyaiAdvancedWorkbench :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input) {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  box-shadow: none !important;
  filter: none !important;
  color-scheme: light;
  accent-color: var(--txyai-checkbox-red) !important;
  cursor: pointer;
  vertical-align: -5px;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

:is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):checked,
.tyai-app #tyaiAdvancedWorkbench :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):checked {
  border-color: var(--txyai-checkbox-ink) !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.4l4.4 4.4L19.4 6.6' fill='none' stroke='%23d41427' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

:is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):focus-visible,
.tyai-app #tyaiAdvancedWorkbench :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):focus-visible {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

:is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):disabled,
.tyai-app #tyaiAdvancedWorkbench :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

input[type="checkbox"][hidden] {
  display: none !important;
}

/* 管理后台旧通用输入框规则特异性较高，这里只为复选框收回统一外观。 */
html#txya-admin-monochrome#txya-admin-monochrome body :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input) {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background-color: var(--txyai-checkbox-white) !important;
}

html#txya-admin-monochrome#txya-admin-monochrome body :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):checked {
  border-color: var(--txyai-checkbox-ink) !important;
  background-color: var(--txyai-checkbox-white) !important;
}

html#txya-admin-monochrome#txya-admin-monochrome body :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):focus-visible {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

/* 卡片代理会自己绘制选择状态；放在原生/后台重置之后，禁用时仍隐藏原生 input。 */
html body :is(.tyai-clone-targets, .tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes, .tyai-goal) :is(input[type="checkbox"], input[type="radio"]),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-clone-targets, .tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes, .tyai-goal) :is(input[type="checkbox"], input[type="radio"]),
html#txya-admin-monochrome#txya-admin-monochrome body :is(.tyai-clone-targets, .tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes, .tyai-goal) :is(input[type="checkbox"], input[type="radio"]) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

html body :is(.tyai-clone-targets, .tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:disabled + :is(span, .tyai-ratio-card),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-clone-targets, .tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:disabled + :is(span, .tyai-ratio-card),
html body .tyai-goal:has(input:disabled),
html body .tyai-app #tyaiAdvancedWorkbench .tyai-goal:has(input:disabled),
html#txya-admin-monochrome#txya-admin-monochrome body :is(.tyai-clone-targets, .tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:disabled + :is(span, .tyai-ratio-card),
html#txya-admin-monochrome#txya-admin-monochrome body .tyai-goal:has(input:disabled) {
  cursor: not-allowed !important;
  opacity: 0.52 !important;
}

html#txya-admin-monochrome#txya-admin-monochrome body .magic-checkbox + label:before,
html#txya-admin-monochrome#txya-admin-monochrome body input[type="checkbox"].magic-radio + label:before {
  border-width: 2px !important;
  border-color: var(--txyai-checkbox-ink) !important;
}

html#txya-admin-monochrome#txya-admin-monochrome body .magic-checkbox:checked + label:before,
html#txya-admin-monochrome#txya-admin-monochrome body input[type="checkbox"].magic-radio:checked + label:before {
  border-color: var(--txyai-checkbox-ink) !important;
  background-color: var(--txyai-checkbox-white) !important;
}

html#txya-admin-monochrome#txya-admin-monochrome body .magic-checkbox + label:after,
html#txya-admin-monochrome#txya-admin-monochrome body input[type="checkbox"].magic-radio + label:after {
  border-width: 0 3px 3px 0 !important;
  border-color: var(--txyai-checkbox-red) !important;
}

/* 旧表单用隐藏 input + label 绘制复选框；只接管 checkbox，保留真正的 radio 圆点。 */
html body input.magic-checkbox,
html body input[type="checkbox"].magic-radio {
  position: absolute !important;
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body input.magic-checkbox + label::before,
html body input[type="checkbox"].magic-radio + label::before {
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
}

html body input.magic-checkbox + label:hover::before,
html body input[type="checkbox"].magic-radio + label:hover::before {
  animation-name: none !important;
  border-color: var(--txyai-checkbox-ink) !important;
}

html body input.magic-checkbox:checked + label,
html body input[type="checkbox"].magic-radio:checked + label {
  color: inherit !important;
}

html body input.magic-checkbox:checked + label::before,
html body input[type="checkbox"].magic-radio:checked + label::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body input.magic-checkbox + label::after,
html body input[type="checkbox"].magic-radio + label::after {
  top: 3px !important;
  left: 8px !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  border-width: 0 3px 3px 0 !important;
  border-style: solid !important;
  border-color: var(--txyai-checkbox-red) !important;
}

html body input.magic-checkbox:focus-visible + label::before,
html body input[type="checkbox"].magic-radio:focus-visible + label::before {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

html body input.magic-checkbox[disabled] + label,
html body input[type="checkbox"].magic-radio[disabled] + label {
  color: inherit !important;
  opacity: 0.52;
}

html body input.magic-checkbox[disabled] + label::before,
html body input[type="checkbox"].magic-radio[disabled] + label::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body input.magic-checkbox:checked[disabled] + label::before,
html body input[type="checkbox"].magic-radio:checked[disabled] + label::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

/* 电脑端发布页后置内联样式会再次绘制标签伪元素；只覆盖 checkbox，radio 保持圆点。 */
html body.x1v2-post-page .checkboxinner > input[type="checkbox"] + label::before {
  left: 14px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  margin-top: -11px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
}

html body.x1v2-post-page .checkboxinner > input[type="checkbox"] + label::after {
  content: "" !important;
  left: 22px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  margin: -8px 0 0 !important;
  border: solid var(--txyai-checkbox-red) !important;
  border-width: 0 3px 3px 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  opacity: 0 !important;
  transform: rotate(45deg) !important;
}

html body.x1v2-post-page .checkboxinner > input[type="checkbox"]:checked + label::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body.x1v2-post-page .checkboxinner > input[type="checkbox"]:checked + label::after {
  opacity: 1 !important;
}

html body.x1v2-post-page .checkboxinner > input[type="checkbox"]:focus-visible + label::before {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

/* 电脑端发布页最终可见按钮代理：脚本已写入类型类，只处理 checkbox 代理。 */
html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--checkbox::before {
  left: 14px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  margin-top: -11px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--checkbox::after {
  content: "" !important;
  left: 22px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  margin: -8px 0 0 !important;
  border: solid var(--txyai-checkbox-red) !important;
  border-width: 0 3px 3px 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 1 !important;
  opacity: 0 !important;
  transform: rotate(45deg) !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--checkbox.is-selected::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--checkbox.is-selected::after {
  opacity: 1 !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--checkbox:focus-visible::before {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--checkbox:disabled::before {
  opacity: 0.52 !important;
}

/* 手机发布页运行时给真实 checkbox 的 label 加类型类，只接管 checkbox 方框。 */
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--checkbox::before {
  left: 12px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
}

html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--checkbox::after {
  content: "" !important;
  left: 20px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  margin: -8px 0 0 !important;
  border: solid var(--txyai-checkbox-red) !important;
  border-width: 0 3px 3px 0 !important;
  display: none !important;
  transform: rotate(45deg) !important;
}

html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--checkbox.is-selected::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--checkbox.is-selected::after {
  display: block !important;
}

html body .ma-extra-row[data-x1-choice-ready="1"] input[type="checkbox"]:focus-visible + label.x1-choice-label--checkbox::before,
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--checkbox:has(input[type="checkbox"]:focus-visible)::before {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

/* 手机商品发布把 input 收成 0×0；用同一标签的伪元素显示标准方框和红勾。 */
html body .ma-main .ma-goods-form-page .ma-goods-form--pro .ma-chip.ma-chip--check {
  justify-content: flex-start !important;
  padding-left: 44px !important;
}

html body .ma-main .ma-goods-form-page .ma-goods-form--pro .ma-chip.ma-chip--check::before {
  content: "" !important;
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
}

html body .ma-main .ma-goods-form-page .ma-goods-form--pro .ma-chip.ma-chip--check::after {
  content: "" !important;
  position: absolute !important;
  left: 20px !important;
  top: 50% !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  margin-top: -8px !important;
  border: solid var(--txyai-checkbox-red) !important;
  border-width: 0 3px 3px 0 !important;
  opacity: 0 !important;
  transform: rotate(45deg) !important;
}

html body .ma-main .ma-goods-form-page .ma-goods-form--pro .ma-chip.ma-chip--check:has(input[type="checkbox"]:checked)::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body .ma-main .ma-goods-form-page .ma-goods-form--pro .ma-chip.ma-chip--check:has(input[type="checkbox"]:checked)::after {
  opacity: 1 !important;
}

html body .ma-main .ma-goods-form-page .ma-goods-form--pro .ma-chip.ma-chip--check:focus-within::before {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

/* 视频复刻栏目把原生 checkbox 隐藏后用卡片伪元素代画，这里同步为全站标准。 */
html body .tyai-clone-targets input[type="checkbox"] + span::before,
html body .tyai-clone-targets label.is-selected span::before {
  left: 15px !important;
  width: 22px !important;
  height: 22px !important;
  box-sizing: border-box !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
}

html body .tyai-clone-targets input[type="checkbox"] + span::after,
html body .tyai-clone-targets label.is-selected span::after {
  left: 26px !important;
  width: 7px !important;
  height: 13px !important;
  box-sizing: border-box !important;
  border-width: 0 3px 3px 0 !important;
  border-style: solid !important;
  border-color: var(--txyai-checkbox-red) !important;
  opacity: 0;
  transform: translate(-50%, -62%) rotate(45deg) !important;
}

html body .tyai-clone-targets input[type="checkbox"]:checked + span,
html body .tyai-clone-targets label.is-selected span {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body .tyai-clone-targets input[type="checkbox"]:checked + span::before,
html body .tyai-clone-targets label.is-selected span::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body .tyai-clone-targets input[type="checkbox"]:checked + span::after,
html body .tyai-clone-targets label.is-selected span::after {
  opacity: 1 !important;
}

html body .tyai-clone-targets input[type="checkbox"]:focus-visible + span {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
  border-color: var(--txyai-checkbox-ink) !important;
  transform: none !important;
}

/* 原生 radio 保留单选语义和互斥关系，外观使用圆形白底黑边与红勾。 */
html body input[type="radio"]:not(.magic-radio),
html body .tyai-app #tyaiAdvancedWorkbench input[type="radio"]:not(.magic-radio),
html#txya-admin-monochrome#txya-admin-monochrome body input[type="radio"]:not(.magic-radio) {
  border-radius: 50% !important;
}

/* 旧 magic-radio 仍是真正的 radio；只改代理圆框和勾，不改变 name/value/checked。 */
html body input[type="radio"].magic-radio {
  position: absolute !important;
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html body input[type="radio"].magic-radio + label::before,
html#txya-admin-monochrome#txya-admin-monochrome body input[type="radio"].magic-radio + label::before {
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 50% !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
}

html body input[type="radio"].magic-radio + label::after,
html#txya-admin-monochrome#txya-admin-monochrome body input[type="radio"].magic-radio + label::after {
  top: 3px !important;
  left: 8px !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  border: solid var(--txyai-checkbox-red) !important;
  border-width: 0 3px 3px 0 !important;
  background: transparent !important;
  transform: rotate(45deg) !important;
}

html body input[type="radio"].magic-radio:checked + label::before,
html#txya-admin-monochrome#txya-admin-monochrome body input[type="radio"].magic-radio:checked + label::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body input[type="radio"].magic-radio:focus-visible + label::before {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

html body input[type="radio"].magic-radio:disabled + label {
  opacity: 0.52 !important;
}

/* 电脑和手机发布页的脚本代理：卡面及选择框始终白底黑边，radio 仍保留互斥语义。 */
html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill,
html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill:is(:hover, .is-selected),
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label,
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label:is(:hover, .is-selected) {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--radio::before,
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--radio::before {
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 50% !important;
  background: var(--txyai-checkbox-white) !important;
  box-shadow: none !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill:is(.x1v37-choice-pill--checkbox, .x1v37-choice-pill--radio).is-selected::before,
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label:is(.x1-choice-label--checkbox, .x1-choice-label--radio).is-selected::before {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--radio::after,
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--radio::after {
  content: "" !important;
  box-sizing: border-box !important;
  width: 7px !important;
  height: 13px !important;
  border: solid var(--txyai-checkbox-red) !important;
  border-width: 0 3px 3px 0 !important;
  background: transparent !important;
  opacity: 0 !important;
  transform: rotate(45deg) !important;
}

html body.x1v2-post-page #x1v2-extra-source-grid .x1v37-choice-pill.x1v37-choice-pill--radio.is-selected::after,
html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label--radio.is-selected::after {
  opacity: 1 !important;
}

html body .ma-extra-row[data-x1-choice-ready="1"] label.x1-choice-label:is(.x1-choice-label--checkbox, .x1-choice-label--radio).is-selected::after {
  display: block !important;
  border-color: var(--txyai-checkbox-red) !important;
}

/* 可见原生输入的选择卡：卡面始终白底黑边，由输入框本身显示红勾。 */
html body :is(.tyai-channel-option, .tyai-strategy__mode, .tyai-member-identity__choice, .tyai-member-identity__chip, .tyai-xhs-mode-card),
html body :is(.tyai-channel-option, .tyai-strategy__mode, .tyai-member-identity__choice, .tyai-member-identity__chip, .tyai-xhs-mode-card):is(.is-selected, .is-checked),
html body :is(.tyai-channel-option, .tyai-strategy__mode, .tyai-member-identity__choice, .tyai-member-identity__chip, .tyai-xhs-mode-card):has(input:checked),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-channel-option, .tyai-strategy__mode, .tyai-xhs-mode-card),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-channel-option, .tyai-strategy__mode, .tyai-xhs-mode-card):is(.is-selected, .is-checked),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-channel-option, .tyai-strategy__mode, .tyai-xhs-mode-card):has(input:checked) {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

/* 隐藏原生 input 的选择卡：卡面白底黑边，右上角显示统一选择框。 */
html body :is(.tyai-clone-mode span, .tyai-ratio-card, .tyai-clone-trim__modes span),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-clone-mode span, .tyai-ratio-card, .tyai-clone-trim__modes span) {
  position: relative !important;
  padding-right: 44px !important;
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

html body :is(.tyai-clone-mode span, .tyai-ratio-card, .tyai-clone-trim__modes span)::after,
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-clone-mode span, .tyai-ratio-card, .tyai-clone-trim__modes span)::after {
  content: "" !important;
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 50% !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  box-shadow: none !important;
}

html body :is(.tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:checked + :is(span, .tyai-ratio-card),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:checked + :is(span, .tyai-ratio-card) {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

html body :is(.tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:checked + :is(span, .tyai-ratio-card)::after,
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:checked + :is(span, .tyai-ratio-card)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.4l4.4 4.4L19.4 6.6' fill='none' stroke='%23d41427' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

html body :is(.tyai-clone-mode, .tyai-ratio-options, .tyai-clone-trim__modes) input:focus-visible + :is(span, .tyai-ratio-card) {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

/* 创作目标卡同样隐藏原生 input，卡面自身承担白底黑边和红勾反馈。 */
html body .tyai-goal,
html body .tyai-app #tyaiAdvancedWorkbench .tyai-goal {
  position: relative !important;
  padding-right: 44px !important;
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

html body .tyai-goal::after,
html body .tyai-app #tyaiAdvancedWorkbench .tyai-goal::after {
  content: "" !important;
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  box-shadow: none !important;
}

html body .tyai-goal:has(input:checked),
html body .tyai-app #tyaiAdvancedWorkbench .tyai-goal:has(input:checked) {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body .tyai-goal:has(input:checked)::after,
html body .tyai-app #tyaiAdvancedWorkbench .tyai-goal:has(input:checked)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.4l4.4 4.4L19.4 6.6' fill='none' stroke='%23d41427' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

html body .tyai-goal:focus-within {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

/* 由按钮或 class/ARIA 表示状态的选择卡，保持白底黑边并显示红勾。 */
html body :is(.tyai-engine-card, .tyai-commerce-market button, .tyai-voice-mode-tabs button, .tyai-voice-library__views button, .tyai-avatar-preset, .tyai-avatar-voice-option, .tyai-voice-card, .tyai-feedback-card__rating, .tyai-x1pay-tier, .tyai-x1pay-method),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-engine-card, .tyai-commerce-market button, .tyai-voice-mode-tabs button, .tyai-voice-library__views button, .tyai-avatar-preset, .tyai-avatar-voice-option, .tyai-voice-card, .tyai-feedback-card__rating, .tyai-x1pay-tier, .tyai-x1pay-method),
html body .tyai-app:not([data-a2-route="home"]):not([data-a2-route="account"]):not([data-a2-route="invite"]) #tyaiAdvancedWorkbench :is(.tyai-avatar-voice-option, .tyai-voice-card) {
  position: relative !important;
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

html body :is(.tyai-engine-card[aria-checked="true"], .tyai-commerce-market button.is-active, .tyai-voice-mode-tabs button.is-active, .tyai-voice-library__views button.is-active, .tyai-avatar-preset.is-selected, .tyai-avatar-voice-option.is-selected, .tyai-voice-card.is-selected, .tyai-feedback-card__rating.is-selected, .tyai-x1pay-tier.is-on, .tyai-x1pay-method.is-on),
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-engine-card[aria-checked="true"], .tyai-commerce-market button.is-active, .tyai-voice-mode-tabs button.is-active, .tyai-voice-library__views button.is-active, .tyai-avatar-preset.is-selected, .tyai-avatar-voice-option.is-selected, .tyai-voice-card.is-selected, .tyai-feedback-card__rating.is-selected, .tyai-x1pay-tier.is-on, .tyai-x1pay-method.is-on),
html body .tyai-app:not([data-a2-route="home"]):not([data-a2-route="account"]):not([data-a2-route="invite"]) #tyaiAdvancedWorkbench :is(.tyai-avatar-voice-option.is-selected, .tyai-voice-card.is-selected) {
  border-color: var(--txyai-checkbox-ink) !important;
  background: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  color: var(--txyai-checkbox-ink) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-ink) !important;
  box-shadow: none !important;
}

/* 会员中心后置悬停合同也不能把白色选择卡的文字重新刷成白色。 */
html body .tyai-app[data-a2-shell-ready="1"] .tyai-a2-center-body #tyaiAdvancedWorkbench :is(.tyai-engine-card, .tyai-commerce-market button, .tyai-voice-mode-tabs button, .tyai-voice-library__views button, .tyai-avatar-preset, .tyai-avatar-voice-option, .tyai-voice-card, .tyai-feedback-card__rating, .tyai-x1pay-tier, .tyai-x1pay-method) {
  color: var(--txyai-checkbox-ink) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-ink) !important;
}

html body .tyai-app[data-a2-shell-ready="1"] .tyai-a2-center-body #tyaiAdvancedWorkbench :is(.tyai-engine-card, .tyai-commerce-market button, .tyai-voice-mode-tabs button, .tyai-voice-library__views button, .tyai-avatar-preset, .tyai-avatar-voice-option, .tyai-voice-card, .tyai-feedback-card__rating, .tyai-x1pay-tier, .tyai-x1pay-method) * {
  -webkit-text-fill-color: currentColor !important;
}

html body .tyai-app[data-a2-shell-ready="1"] .tyai-a2-center-body #tyaiAdvancedWorkbench .tyai-voice-card .tyai-voice-card__avatar {
  color: var(--txyai-checkbox-white) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-white) !important;
}

html body :is(.tyai-engine-card[aria-checked="true"], .tyai-commerce-market button.is-active, .tyai-voice-mode-tabs button.is-active, .tyai-voice-library__views button.is-active, .tyai-avatar-preset.is-selected, .tyai-avatar-voice-option.is-selected, .tyai-voice-card.is-selected, .tyai-feedback-card__rating.is-selected, .tyai-x1pay-tier.is-on, .tyai-x1pay-method.is-on)::after,
html body .tyai-app #tyaiAdvancedWorkbench :is(.tyai-engine-card[aria-checked="true"], .tyai-commerce-market button.is-active, .tyai-voice-mode-tabs button.is-active, .tyai-voice-library__views button.is-active, .tyai-avatar-preset.is-selected, .tyai-avatar-voice-option.is-selected, .tyai-voice-card.is-selected, .tyai-feedback-card__rating.is-selected, .tyai-x1pay-tier.is-on, .tyai-x1pay-method.is-on)::after {
  content: "" !important;
  position: absolute !important;
  top: -7px !important;
  right: -7px !important;
  box-sizing: border-box !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.4l4.4 4.4L19.4 6.6' fill='none' stroke='%23d41427' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 14px 14px !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

html body :is(.tyai-engine-card, .tyai-commerce-market button, .tyai-voice-mode-tabs button, .tyai-voice-library__views button, .tyai-avatar-preset, .tyai-avatar-voice-option, .tyai-voice-card, .tyai-feedback-card__rating, .tyai-x1pay-tier, .tyai-x1pay-method):focus-visible {
  outline: 3px solid rgba(212, 20, 39, 0.22) !important;
  outline-offset: 2px !important;
}

html body .tyai-app #tyaiAdvancedWorkbench .tyai-commerce-market button.is-active > :is(b, small) {
  color: var(--txyai-checkbox-ink) !important;
  -webkit-text-fill-color: var(--txyai-checkbox-ink) !important;
}

/* 会员中心后置通用 input 规则会把单选框拉高并让红勾重复，最终层重新锁定原生选择控件。 */
html body .tyai-app .tyai-a2-center-body :is(input[type="checkbox"], input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input) {
  box-sizing: border-box !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  padding: 0 !important;
  border: 2px solid var(--txyai-checkbox-ink) !important;
  border-radius: 4px !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  box-shadow: none !important;
}

html body .tyai-app .tyai-a2-center-body :is(input[type="checkbox"], input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input):checked {
  border-color: var(--txyai-checkbox-ink) !important;
  background-color: var(--txyai-checkbox-white) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 12.4l4.4 4.4L19.4 6.6' fill='none' stroke='%23d41427' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
}

@media (max-width: 760px) {
  html body .tyai-clone-targets span {
    padding-left: 42px !important;
  }

  html body .tyai-clone-targets input[type="checkbox"] + span::before,
  html body .tyai-clone-targets label.is-selected span::before {
    left: 10px !important;
  }

  html body .tyai-clone-targets input[type="checkbox"] + span::after,
  html body .tyai-clone-targets label.is-selected span::after {
    left: 21px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(input[type="checkbox"],input[type="radio"]):not(.magic-checkbox, .magic-radio, .xhs-toggle input, .tap-switch input, .tyai-knowledge__switch input, .dz-parttime-schedule__toggle input) {
    transition: none;
  }
}
