/* 选择器（内测） */
.dc { max-width: 860px; margin: 0 auto; display: grid; gap: 16px; padding-bottom: 24px; }
.dc-beta { background: rgba(46,144,250,.12) !important; color: #1f6fd0 !important; }
.dc-ask { padding: 18px 20px 16px; display: grid; gap: 12px; }
.dc-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dc-hd b { font-size: 17px; }
.dc-hd .muted { font-size: 13px; }
.dc-q { height: auto; min-height: 64px; padding: 10px 12px; font-size: 16px; line-height: 1.55; resize: vertical; }
.dc-x { border: 0; background: none; color: var(--muted); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; cursor: pointer; }
.dc-x:hover { background: var(--hover); color: var(--c-red); }
.dc-x .i { width: 14px; height: 14px; }
.dc-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-btns .btn { height: 36px; padding: 0 16px; font-size: 14.5px; }
.dc-note { font-size: 12.5px; flex: 1; min-width: 220px; }

.dc-res { padding: 18px 20px; display: grid; gap: 10px; }
.dc-res.pop { animation: dcPop .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes dcPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dc-wait { place-items: center; padding: 34px 20px; color: var(--sub); }
.dc-rq { font-size: 14px; color: var(--fg2); }
.dc-among { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sub); margin-top: -4px; }
.dc-wx { display: inline-flex; align-items: center; gap: 6px; align-self: start; justify-self: start; font-size: 12.5px; color: #1f6fd0;
  background: rgba(46,144,250,.09); border: 1px solid rgba(46,144,250,.18); border-radius: 999px; padding: 3px 10px 3px 8px; }
.dc-wx .i { width: 14px; height: 14px; }
.dc-web { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: #3a4a63; background: rgba(46,144,250,.07); border: 1px solid rgba(46,144,250,.2); border-radius: 10px; padding: 5px 10px; line-height: 1.7; }
.dc-web .i { width: 14px; height: 14px; flex: none; margin-top: 4px; }
.dc-web a { color: #1f6fd0; text-decoration: none; } .dc-web a:hover { text-decoration: underline; }
.dc-kb { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: #6b5a1e; background: rgba(224,168,0,.09); border: 1px solid rgba(224,168,0,.22); border-radius: 10px; padding: 5px 10px; line-height: 1.6; }
.dc-kb .i { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.dc-rate { color: #15874a; background: rgba(21,135,74,.08); border-color: rgba(21,135,74,.2); }
.dc-among span { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--fg2); background: var(--bg2); }
.dc-final { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dc-final span { font-size: 14px; color: var(--sub); }
.dc-final b { font-size: 30px; font-weight: 800; letter-spacing: .02em; color: var(--accent); line-height: 1.2; }
.dc-res.rand .dc-final b { color: #c4622d; }
.dc-no { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: #b4502f; }
.dc-no .i { width: 20px; height: 20px; }
.dc-refuse .dc-reason { color: var(--fg2); margin: 0; white-space: pre-line; }
.dc-verdict { font-size: 13px; color: var(--sub); }
.dc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.dc-col { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.dc-col h4 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.dc-col h4 .i { width: 15px; height: 15px; color: var(--sub); }
.dc-col h4 .muted { margin-left: auto; font-weight: 400; font-size: 12.5px; }
.dc-bar { display: grid; grid-template-columns: minmax(0, 7em) 1fr 3em; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; }
.dc-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg2); }
.dc-bt { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dc-bt i { display: block; height: 100%; border-radius: 4px; background: var(--muted); transition: width .6s ease; }
.dc-bar.on .dc-bt i { background: var(--accent); }
.dc-bar.on .dc-bl, .dc-bar.on b { color: var(--fg); font-weight: 600; }
.dc-bar b { text-align: right; font-weight: 500; color: var(--sub); }
.dc-lean { font-size: 13px; color: var(--sub); }
.dc-lean b { color: var(--fg); }
.dc-reason { margin: 6px 0 0; font-size: 14px; line-height: 1.65; color: var(--fg); }
.dc-tip { margin: 8px 0 0; font-size: 12.5px; color: var(--sub); display: flex; gap: 5px; align-items: flex-start; line-height: 1.55; }
.dc-tip .i { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.dc-miss { font-size: 13px; padding: 4px 0; }
.dc-ra { display: flex; gap: 6px; justify-content: flex-end; }

.dc-dots { display: inline-flex; gap: 3px; margin-right: 4px; }
.dc-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dcDot 1s infinite ease-in-out; }
.dc-dots i:nth-child(2) { animation-delay: .15s; } .dc-dots i:nth-child(3) { animation-delay: .3s; }
.dc-dots.big { gap: 6px; margin: 0 0 6px; color: var(--accent); } .dc-dots.big i { width: 9px; height: 9px; }
@keyframes dcDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.dc-hist { padding-bottom: 6px; }
.dc-list { padding: 2px 8px 6px; }
.dc-empty { padding: 10px 8px 14px; font-size: 13px; }
.dc-it { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 26px; gap: 10px; align-items: center; padding: 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.dc-it:hover { background: var(--hover); }
.dc-iq { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-ip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--accent-weak); color: var(--accent); font-weight: 600; font-size: 12.5px; max-width: 12em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dc-ip.rand { background: rgba(217,119,87,.14); color: #c4622d; }
.dc-ip .i { width: 13px; height: 13px; }
.dc-it-t { font-size: 12px; }
.dc-it .dc-x { opacity: 0; } .dc-it:hover .dc-x { opacity: 1; }

@media (max-width: 760px) {
  .dc-cols { grid-template-columns: 1fr; }
  .dc-final b { font-size: 26px; }
  .dc-it { grid-template-columns: minmax(0, 1fr) auto 26px; } .dc-it-t { display: none; } .dc-it .dc-x { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .dc-res.pop, .dc-dots i { animation: none; } }

/* 交给天意：抛硬币动画（舞台 200×210；像素小怪 11×8 格，1 格 8px，放在底部正中；硬币坐在右手上） */
.dc-toss { padding: 22px 20px 18px; }
.toss { position: relative; width: 200px; height: 210px; perspective: 700px; }
.toss-cl { position: absolute; left: 56px; bottom: 12px; width: 88px; height: 64px; overflow: visible; }
.toss-body { animation: tossHop 1.6s both; }
.toss-eyes { animation: tossEye 1.6s both; }
.toss-arm { animation: tossArm 1.6s both; }
.toss-coin { position: absolute; left: 132px; top: 126px; width: 32px; height: 32px; transform-style: preserve-3d; animation: tossCoin 1.6s both; }
.toss-coin i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; color: #8a5a00;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23c98a10' d='M2 0h4v1h1v1h1v4h-1v1h-1v1h-4v-1h-1v-1h-1v-4h1v-1h1z'/%3E%3Cpath fill='%23f6c945' d='M2 1h4v1h1v4h-1v1h-4v-1h-1v-4h1z'/%3E%3Cpath fill='%23fff3b0' d='M2 2h2v1h-1v1h-1z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; image-rendering: pixelated; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.toss-coin i.b { transform: rotateX(180deg); }
.toss-ring { position: absolute; left: 128px; top: 122px; width: 40px; height: 40px; border: 3px dashed rgba(246,201,69,.9); opacity: 0;
  animation: tossRing .45s 1.34s steps(3) forwards; }
@keyframes tossCoin {
  0% { transform: translateY(0) rotateX(0); animation-timing-function: cubic-bezier(.2,.7,.4,1); }
  48% { transform: translateY(-96px) rotateX(900deg); animation-timing-function: cubic-bezier(.6,0,.8,.5); }
  84% { transform: translateY(0) rotateX(1800deg); animation-timing-function: ease-out; }
  91% { transform: translateY(-6px) rotateX(1800deg); animation-timing-function: ease-in; }
  100% { transform: translateY(0) rotateX(1800deg); } }
/* 下面三个按整格跳（steps），保持像素动画的顿挫感 */
@keyframes tossArm { 0% { transform: translateY(0); } 4% { transform: translateY(-1px); } 18%, 100% { transform: translateY(0); } }
@keyframes tossEye { 0%, 10% { transform: translate(0, 0); } 14%, 70% { transform: translate(0, -1px); } 74%, 100% { transform: translate(0, 0); } }
@keyframes tossHop { 0%, 84% { transform: translateY(0); } 86%, 92% { transform: translateY(-1px); } 94%, 100% { transform: translateY(0); } }
.toss-arm, .toss-eyes, .toss-body { animation-timing-function: steps(1, end); }
@keyframes tossRing { from { opacity: 1; transform: scale(.8); } to { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .toss-coin, .toss-arm, .toss-eyes, .toss-body, .toss-ring { animation: none; } }

/* 帮我查 */
.lk-ans { font-size: 15px; line-height: 1.8; color: var(--fg); white-space: pre-line; }
.lk-cite { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; margin: 0 1px; border-radius: 4px; font-size: 11px; font-weight: 700;
  color: #1f6fd0; background: rgba(46,144,250,.12); text-decoration: none; vertical-align: 2px; }
.lk-cite:hover { background: #2e90fa; color: #fff; }
.lk-src { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.lk-src-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sub); margin-bottom: 2px; }
.lk-src-h .i { width: 14px; height: 14px; }
.lk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.lk-save { white-space: nowrap; }
.lk-deep { background: rgba(21,135,74,.12) !important; color: #15874a !important; }
.kb-it .dc-iq { color: var(--fg); text-decoration: none; } .kb-it .dc-iq:hover { text-decoration: underline; }
.lk-src a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; text-decoration: none; color: var(--fg2); padding: 3px 4px; border-radius: 6px; }
.lk-src a:hover { background: var(--hover); }
.lk-src a b { color: #1f6fd0; font-size: 12px; }
.lk-src a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-src a em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 深色模式：知识库 / 联网 / 通过率提示条的文字颜色调亮 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dc-kb { color: #e8cf7a; background: rgba(224,168,0,.12); border-color: rgba(224,168,0,.3); }
  :root:not([data-theme="light"]) .dc-web { color: #b7cdf0; }
  :root:not([data-theme="light"]) .dc-web a, :root:not([data-theme="light"]) .lk-src a b { color: #7db7ff; }
  :root:not([data-theme="light"]) .dc-rate { color: #6fd39b; }
  :root:not([data-theme="light"]) .lk-cite { color: #9cc8ff; background: rgba(46,144,250,.22); }
}
