/* 探索好奇：复用 .xt、.demo 与数字人口播的一行标题规格。 */
#curious .xgrid {
  --tile-gap: clamp(12px, 1.6vw, 24px);
  /* 沿用原四列卡片的高度；媒体宽度仅由其原始比例决定。 */
  --tile-height: calc((100vw - 2 * var(--gutter) - 3 * var(--tile-gap)) / 6);
  display: flex; flex-direction: column; gap: var(--tile-gap);
  padding: clamp(48px, 7vh, 80px) 0 10px;
  mask-image: none; -webkit-mask-image: none;
}
.xrow {
  display: flex; gap: var(--tile-gap); overflow-x: auto; overflow-y: hidden;
  padding: 10px var(--gutter); scrollbar-width: none;
  cursor: grab; touch-action: pan-x pan-y; overscroll-behavior-x: contain;
}
.xrow::-webkit-scrollbar { display: none; }
.xrow:nth-child(2) { padding-left: calc(var(--gutter) + var(--tile-height) * .7); }
.xrow:nth-child(3) { padding-left: calc(var(--gutter) + var(--tile-height) * .25); }
#curious .xt {
  flex: 0 0 auto; width: auto; height: var(--tile-height);
  aspect-ratio: var(--media-ratio, 3 / 2); animation: none;
  user-select: none; -webkit-user-drag: none;
}
#curious .xt .demo { inset: 0; }
#curious .xt footer {
  left: 12px; right: 12px; bottom: 10px; height: auto; padding: 0;
  display: flex; flex-wrap: nowrap; align-items: baseline; gap: 8px;
  opacity: 1; transform: none; background: none; border-radius: 0;
  white-space: nowrap; pointer-events: none;
}
#curious .xt footer strong { font-family: var(--serif); font-size: 15px; font-weight: 700; }
#curious .xt footer span {
  display: inline; flex-basis: auto; order: initial;
  font-size: 12px; color: rgba(26,26,26,.55);
}
#curious .xt .xt-cta { display: none; }
#curious .xt[data-tool]:hover { scale: 1; box-shadow: none; }
#curious .xt:focus-visible, .xrow:focus-visible { outline: 2px solid var(--rust); outline-offset: -2px; }
#curious .xt-media { background: #111216; }
.xt-media video { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
/* 保留工具动效周围的呼吸空间，为常显的底部标题让位。 */
#curious .d-pk .pk-bar { top: 7%; }
#curious .d-pk .pk-track { top: 70%; }
#curious .d-pk .pk-btn { top: 69%; }
#curious .d-qp .qd-doc { top: 10%; height: 62%; }
#curious .d-qp .qd-win { top: 7%; height: 72%; }
.xrow.is-dragging, .xrow.is-dragging .xt { cursor: grabbing; }
#toolNote:empty { display: none; }
@media(max-width:900px) {
  #curious .xgrid { --tile-height: clamp(205px, 38vw, 280px); }
  .tool-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* 标题固定在卡片内部左下；浅底黑字，深底白字。 */
#curious .xt { width: calc(var(--tile-height) * var(--media-width, 1.5)); height: var(--tile-height); aspect-ratio: auto; border-radius: 16px; overflow: hidden; }
#curious .xt .demo { inset: 0; }
#curious .xt footer { left: 10px; right: 10px; bottom: 9px; padding: 0; min-height: 0; color: var(--ink); background: none; border-radius: 0; width: fit-content; max-width: calc(100% - 20px); flex-wrap: wrap; white-space: normal; z-index: 2; }
#curious .xt footer strong { color: inherit; }
#curious .xt footer span { color: rgba(26,26,26,.6); }
#curious .xt.caption-light footer { color: #fff; background: none; }
#curious .xt.caption-light footer span { color: rgba(255,255,255,.7); }
#curious .xt[data-tool]:hover { scale: 1; box-shadow: none; }
#curious .xt::before, #curious .xt::after { content: none; }
/* An explicit ratio reserves the full player size before video metadata arrives. */
.tool-win.is-video {
  width: min(1100px, 94vw, calc((90dvh - 144px) * var(--video-ratio)));
  max-width: 94vw; height: auto; max-height: 90dvh; animation: none;
}
.tool-win.is-video .tool-stage { flex: none; min-height: 0; padding: 16px; gap: 12px; }
.tool-win.is-video #toolClone.is-video {
  width: 100%; height: auto; max-width: none; max-height: none;
  aspect-ratio: var(--video-ratio); border-radius: 8px; box-shadow: none;
}
.tool-win.is-video #toolClone video { width: 100%; height: 100%; object-fit: contain; }
.tool-win.is-video #toolNote { width: 100%; text-align: center; line-height: 1.5; }
.tool-win.is-video .tool-bar { height: auto; min-height: 52px; padding-block: 8px; flex-wrap: wrap; gap: 4px 8px; }
.tool-win.is-video .tool-bar i { display: none; }
.tool-win.is-video .tool-bar strong { margin: 0; font-size: 18px; }
.tool-win.is-video .tool-bar span { color: rgba(26,26,26,.65); white-space: normal; }
.tool-win.is-video .tool-bar button { flex: none; }
@media(max-width:600px) {
  .tool-win.is-video .tool-bar { position: relative; padding-right: 48px; display: block; }
  .tool-win.is-video .tool-bar strong, .tool-win.is-video .tool-bar span { display: block; }
  .tool-win.is-video .tool-bar span { margin-top: 3px; font-size: 11px; }
  .tool-win.is-video .tool-bar button { position: absolute; right: 10px; top: 12px; }
  .tool-win.is-video .tool-stage { padding: 10px; }
  .tool-win.is-video #toolNote { font-size: 11px; }
}

